Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
khr_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_KHR_KHR_SWAPCHAIN_VK_H_
6#define FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_SWAPCHAIN_KHR_KHR_SWAPCHAIN_VK_H_
7
8#include <memory>
9
15
16namespace impeller {
17
18class KHRSwapchainImplVK;
19
20//------------------------------------------------------------------------------
21/// @brief A swapchain implemented backed by VK_KHR_swapchain and
22/// VK_KHR_surface.
23///
24class KHRSwapchainVK final : public SwapchainVK {
25 public:
27
28 // |SwapchainVK|
29 bool IsValid() const override;
30
31 // |SwapchainVK|
32 std::unique_ptr<Surface> AcquireNextDrawable() override;
33
34 // |SwapchainVK|
35 vk::Format GetSurfaceFormat() const override;
36
37 // |SwapchainVK|
38 void UpdateSurfaceSize(const ISize& size) override;
39
40 private:
41 friend class SwapchainVK;
42
43 std::shared_ptr<KHRSwapchainImplVK> impl_;
44 ISize size_;
45 const bool enable_msaa_;
46
47 KHRSwapchainVK(const std::shared_ptr<Context>& context,
48 vk::UniqueSurfaceKHR surface,
49 const ISize& size,
50 bool enable_msaa);
51
52 KHRSwapchainVK(const KHRSwapchainVK&) = delete;
53
54 KHRSwapchainVK& operator=(const KHRSwapchainVK&) = delete;
55};
56
57} // namespace impeller
58
59#endif // FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_SWAPCHAIN_KHR_KHR_SWAPCHAIN_VK_H_
A swapchain implemented backed by VK_KHR_swapchain and VK_KHR_surface.
bool IsValid() const override
void UpdateSurfaceSize(const ISize &size) override
Mark the current swapchain configuration as dirty, forcing it to be recreated on the next frame.
vk::Format GetSurfaceFormat() const override
std::unique_ptr< Surface > AcquireNextDrawable() override
A swapchain that adapts to the underlying surface going out of date. If the caller cannot acquire the...
VkSurfaceKHR surface
Definition main.cc:49