forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vulkan_native_surface_android.h
44 lines (29 loc) · 1.21 KB
/
vulkan_native_surface_android.h
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
// Copyright 2016 The Chromium 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 FLUTTER_VULKAN_VULKAN_NATIVE_SURFACE_ANDROID_H_
#define FLUTTER_VULKAN_VULKAN_NATIVE_SURFACE_ANDROID_H_
#include "flutter/vulkan/vulkan_native_surface.h"
#include "lib/fxl/macros.h"
struct ANativeWindow;
typedef struct ANativeWindow ANativeWindow;
namespace vulkan {
class VulkanNativeSurfaceAndroid : public VulkanNativeSurface {
public:
/// Create a native surface from the valid ANativeWindow reference. Ownership
/// of the ANativeWindow is assumed by this instance.
VulkanNativeSurfaceAndroid(ANativeWindow* native_window);
~VulkanNativeSurfaceAndroid();
const char* GetExtensionName() const override;
uint32_t GetSkiaExtensionName() const override;
VkSurfaceKHR CreateSurfaceHandle(
VulkanProcTable& vk,
const VulkanHandle<VkInstance>& instance) const override;
bool IsValid() const override;
SkISize GetSize() const override;
private:
ANativeWindow* native_window_;
FXL_DISALLOW_COPY_AND_ASSIGN(VulkanNativeSurfaceAndroid);
};
} // namespace vulkan
#endif // FLUTTER_VULKAN_VULKAN_NATIVE_SURFACE_ANDROID_H_