Flutter Engine
vulkan_native_surface_android.h
Go to the documentation of this file.
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_ANDROID_H_
6 #define FLUTTER_VULKAN_VULKAN_NATIVE_SURFACE_ANDROID_H_
7 
8 #include "flutter/fml/macros.h"
10 
11 struct ANativeWindow;
13 
14 namespace vulkan {
15 
17  public:
18  /// Create a native surface from the valid ANativeWindow reference. Ownership
19  /// of the ANativeWindow is assumed by this instance.
21 
23 
24  const char* GetExtensionName() const override;
25 
26  uint32_t GetSkiaExtensionName() const override;
27 
28  VkSurfaceKHR CreateSurfaceHandle(
29  VulkanProcTable& vk,
30  const VulkanHandle<VkInstance>& instance) const override;
31 
32  bool IsValid() const override;
33 
34  SkISize GetSize() const override;
35 
36  private:
37  ANativeWindow* native_window_;
38 
39  FML_DISALLOW_COPY_AND_ASSIGN(VulkanNativeSurfaceAndroid);
40 };
41 
42 } // namespace vulkan
43 
44 #endif // FLUTTER_VULKAN_VULKAN_NATIVE_SURFACE_ANDROID_H_
struct ANativeWindow ANativeWindow
VkSurfaceKHR CreateSurfaceHandle(VulkanProcTable &vk, const VulkanHandle< VkInstance > &instance) const override
VulkanNativeSurfaceAndroid(ANativeWindow *native_window)
const char * GetExtensionName() const override