Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
swapchain_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_SWAPCHAIN_SWAPCHAIN_VK_H_
6#define FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_SWAPCHAIN_SWAPCHAIN_VK_H_
7
8#include <memory>
9
14
15namespace impeller {
16
17//------------------------------------------------------------------------------
18/// @brief A swapchain that adapts to the underlying surface going out of
19/// date. If the caller cannot acquire the next drawable, it is due
20/// to an unrecoverable error and the swapchain must be recreated
21/// with a new surface.
22///
24 public:
25 static std::shared_ptr<SwapchainVK> Create(
26 const std::shared_ptr<Context>& context,
27 vk::UniqueSurfaceKHR surface,
28 const ISize& size,
29 bool enable_msaa = true);
30
31 virtual ~SwapchainVK();
32
33 SwapchainVK(const SwapchainVK&) = delete;
34
36
37 virtual bool IsValid() const = 0;
38
39 virtual std::unique_ptr<Surface> AcquireNextDrawable() = 0;
40
41 virtual vk::Format GetSurfaceFormat() const = 0;
42
43 /// @brief Mark the current swapchain configuration as dirty, forcing it to be
44 /// recreated on the next frame.
45 virtual void UpdateSurfaceSize(const ISize& size) = 0;
46
47 protected:
49};
50
51} // namespace impeller
52
53#endif // FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_SWAPCHAIN_SWAPCHAIN_VK_H_
static sk_sp< Effect > Create()
A swapchain that adapts to the underlying surface going out of date. If the caller cannot acquire the...
virtual bool IsValid() const =0
virtual std::unique_ptr< Surface > AcquireNextDrawable()=0
virtual void UpdateSurfaceSize(const ISize &size)=0
Mark the current swapchain configuration as dirty, forcing it to be recreated on the next frame.
SwapchainVK(const SwapchainVK &)=delete
virtual vk::Format GetSurfaceFormat() const =0
SwapchainVK & operator=(const SwapchainVK &)=delete
VkSurfaceKHR surface
Definition main.cc:49