forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgpu_surface_vulkan.h
More file actions
46 lines (32 loc) · 1.2 KB
/
gpu_surface_vulkan.h
File metadata and controls
46 lines (32 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SHELL_GPU_GPU_SURFACE_VULKAN_H_
#define SHELL_GPU_GPU_SURFACE_VULKAN_H_
#include <memory>
#include "flutter/fml/macros.h"
#include "flutter/fml/memory/weak_ptr.h"
#include "flutter/shell/common/surface.h"
#include "flutter/vulkan/vulkan_native_surface.h"
#include "flutter/vulkan/vulkan_window.h"
namespace shell {
class GPUSurfaceVulkan : public Surface {
public:
GPUSurfaceVulkan(fml::RefPtr<vulkan::VulkanProcTable> proc_table,
std::unique_ptr<vulkan::VulkanNativeSurface> native_surface);
~GPUSurfaceVulkan() override;
// |shell::Surface|
bool IsValid() override;
// |shell::Surface|
std::unique_ptr<SurfaceFrame> AcquireFrame(const SkISize& size) override;
// |shell::Surface|
SkMatrix GetRootTransformation() const override;
// |shell::Surface|
GrContext* GetContext() override;
private:
vulkan::VulkanWindow window_;
fml::WeakPtrFactory<GPUSurfaceVulkan> weak_factory_;
FML_DISALLOW_COPY_AND_ASSIGN(GPUSurfaceVulkan);
};
} // namespace shell
#endif // SHELL_GPU_GPU_SURFACE_VULKAN_H_