| Flutter Impeller |

surface_vk.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_IMPELLER_RENDERER_BACKEND_VULKAN_SURFACE_VK_H_
6 #define FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_SURFACE_VK_H_
7
8 #include <memory>
9
10 #include "flutter/fml/macros.h"
11 #include "impeller/renderer/backend/vulkan/context_vk.h"
12 #include "impeller/renderer/backend/vulkan/swapchain_image_vk.h"
13 #include "impeller/renderer/surface.h"
14
15 namespace impeller {
16
17 class SurfaceVK final : public Surface {
18 public:
19 using SwapCallback = std::function<bool(void)>;
20
21 static std::unique_ptr<SurfaceVK> WrapSwapchainImage(
22 const std::shared_ptr<Context>& context,
23 std::shared_ptr<SwapchainImageVK>& swapchain_image,
24 SwapCallback swap_callback);
25
26 // |Surface|
27 ~SurfaceVK() override;
28
29 private:
30 SwapCallback swap_callback_;
31
32 SurfaceVK(const RenderTarget& target, SwapCallback swap_callback);
33
34 // |Surface|
35 bool Present() const override;
36
37 SurfaceVK(const SurfaceVK&) = delete;
38
39 SurfaceVK& operator=(const SurfaceVK&) = delete;
40 };
41
42 } // namespace impeller
43
44 #endif // FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_SURFACE_VK_H_
impeller::SurfaceVK
Definition: surface_vk.h:17
impeller::SurfaceVK::WrapSwapchainImage
static std::unique_ptr< SurfaceVK > WrapSwapchainImage(const std::shared_ptr< Context > &context, std::shared_ptr< SwapchainImageVK > &swapchain_image, SwapCallback swap_callback)
Definition: surface_vk.cc:13
impeller::Surface
Definition: surface.h:18
surface.h
impeller::RenderTarget
Definition: render_target.h:49
swapchain_image_vk.h
impeller::SurfaceVK::~SurfaceVK
~SurfaceVK() override
context_vk.h
impeller
Definition: aiks_context.cc:10
impeller::SurfaceVK::SwapCallback
std::function< bool(void)> SwapCallback
Definition: surface_vk.h:19