forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vulkan_native_surface_magma.h
43 lines (29 loc) · 1.21 KB
/
vulkan_native_surface_magma.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
// Copyright 2017 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_MAGMA_H_
#define FLUTTER_VULKAN_VULKAN_NATIVE_SURFACE_MAGMA_H_
#include "flutter/vulkan/vulkan_native_surface.h"
#include "lib/fxl/macros.h"
namespace vulkan {
class VulkanNativeSurfaceMagma : public vulkan::VulkanNativeSurface {
public:
VulkanNativeSurfaceMagma();
// Alternate constructor which allows the caller to specify the surface's
// width and height.
// TODO: Remove this once we have a Fuchsia Display API.
VulkanNativeSurfaceMagma(int32_t surface_width, int32_t surface_height);
~VulkanNativeSurfaceMagma();
const char* GetExtensionName() const override;
uint32_t GetSkiaExtensionName() const override;
VkSurfaceKHR CreateSurfaceHandle(
vulkan::VulkanProcTable& vk,
const vulkan::VulkanHandle<VkInstance>& instance) const override;
bool IsValid() const override;
SkISize GetSize() const override;
private:
SkISize size_;
FXL_DISALLOW_COPY_AND_ASSIGN(VulkanNativeSurfaceMagma);
};
} // namespace vulkan
#endif // FLUTTER_VULKAN_VULKAN_NATIVE_SURFACE_MAGMA_H_