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 #ifndef RS_ENABLE_VK 9 #include "flutter/fml/macros.h" 10 #endif 11 #include "third_party/skia/include/core/SkSize.h" 12 #include "vulkan_handle.h" 13 #include "vulkan_proc_table.h" 14 15 namespace vulkan { 16 17 class VulkanNativeSurface { 18 public: 19 virtual ~VulkanNativeSurface() = default; 20 21 virtual const char* GetExtensionName() const = 0; 22 23 virtual uint32_t GetSkiaExtensionName() const = 0; 24 25 virtual VkSurfaceKHR CreateSurfaceHandle( 26 VulkanProcTable& vk, 27 const VulkanHandle<VkInstance>& instance) const = 0; 28 29 virtual bool IsValid() const = 0; 30 31 virtual SkISize GetSize() const = 0; 32 }; 33 34 } // namespace vulkan 35 36 #endif // FLUTTER_VULKAN_VULKAN_NATIVE_SURFACE_H_ 37