1 | // Copyright 2013 The Flutter Authors. All rights reserved. |
2 | // Use of this source code is governed by a BSD-style license that can be |
3 | // found in the LICENSE file. |
4 | |
5 | #ifndef FLUTTER_VULKAN_VULKAN_NATIVE_SURFACE_H_ |
6 | #define FLUTTER_VULKAN_VULKAN_NATIVE_SURFACE_H_ |
7 | |
8 | #include "flutter/fml/macros.h" |
9 | #include "third_party/skia/include/core/SkSize.h" |
10 | #include "vulkan_handle.h" |
11 | #include "vulkan_proc_table.h" |
12 | |
13 | namespace vulkan { |
14 | |
15 | class VulkanNativeSurface { |
16 | public: |
17 | virtual ~VulkanNativeSurface() = default; |
18 | |
19 | virtual const char* GetExtensionName() const = 0; |
20 | |
21 | virtual uint32_t GetSkiaExtensionName() const = 0; |
22 | |
23 | virtual VkSurfaceKHR CreateSurfaceHandle( |
24 | VulkanProcTable& vk, |
25 | const VulkanHandle<VkInstance>& instance) const = 0; |
26 | |
27 | virtual bool IsValid() const = 0; |
28 | |
29 | virtual SkISize GetSize() const = 0; |
30 | }; |
31 | |
32 | } // namespace vulkan |
33 | |
34 | #endif // FLUTTER_VULKAN_VULKAN_NATIVE_SURFACE_H_ |
35 | |