Flutter Engine
The Flutter Engine
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...
Definition: swapchain_vk.h:28
VkSurfaceKHR surface
Definition: main.cc:49
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259
def Format(template, **parameters)
Definition: emitter.py:13