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 #pragma once
6 
7 #include <memory>
8 
9 #include "flutter/fml/macros.h"
13 
14 namespace impeller {
15 
16 class SurfaceVK final : public Surface {
17  public:
18  using SwapCallback = std::function<bool(void)>;
19 
20  static std::unique_ptr<SurfaceVK> WrapSwapchainImage(
21  const std::shared_ptr<Context>& context,
22  std::shared_ptr<SwapchainImageVK>& swapchain_image,
23  SwapCallback swap_callback);
24 
25  // |Surface|
26  ~SurfaceVK() override;
27 
28  private:
29  SwapCallback swap_callback_;
30 
31  SurfaceVK(const RenderTarget& target, SwapCallback swap_callback);
32 
33  // |Surface|
34  bool Present() const override;
35 
36  FML_DISALLOW_COPY_AND_ASSIGN(SurfaceVK);
37 };
38 
39 } // namespace impeller
impeller::SurfaceVK
Definition: surface_vk.h:16
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:17
surface.h
impeller::RenderTarget
Definition: render_target.h:48
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:18