Flutter Engine
The Flutter Engine
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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
10#include "flutter/fml/build_config.h"
15
16#if FML_OS_ANDROID
18#endif // FML_OS_ANDROID
19
20namespace impeller {
21
22//------------------------------------------------------------------------------
23/// @brief A swapchain that adapts to the underlying surface going out of
24/// date. If the caller cannot acquire the next drawable, it is due
25/// to an unrecoverable error and the swapchain must be recreated
26/// with a new surface.
27///
29 public:
30 static std::shared_ptr<SwapchainVK> Create(
31 const std::shared_ptr<Context>& context,
32 vk::UniqueSurfaceKHR surface,
33 const ISize& size,
34 bool enable_msaa = true);
35
36#if FML_OS_ANDROID
37 static std::shared_ptr<SwapchainVK> Create(
38 const std::shared_ptr<Context>& context,
40 bool enable_msaa = true);
41#endif // FML_OS_ANDROID
42
43 virtual ~SwapchainVK();
44
45 SwapchainVK(const SwapchainVK&) = delete;
46
48
49 virtual bool IsValid() const = 0;
50
51 virtual std::unique_ptr<Surface> AcquireNextDrawable() = 0;
52
53 virtual vk::Format GetSurfaceFormat() const = 0;
54
55 /// @brief Mark the current swapchain configuration as dirty, forcing it to be
56 /// recreated on the next frame.
57 virtual void UpdateSurfaceSize(const ISize& size) = 0;
58
59 protected:
61};
62
63} // namespace impeller
64
65#endif // FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_SWAPCHAIN_SWAPCHAIN_VK_H_
A swapchain that adapts to the underlying surface going out of date. If the caller cannot acquire the...
Definition: swapchain_vk.h:28
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
static std::shared_ptr< SwapchainVK > Create(const std::shared_ptr< Context > &context, vk::UniqueSurfaceKHR surface, const ISize &size, bool enable_msaa=true)
Definition: swapchain_vk.cc:18
GLFWwindow * window
Definition: main.cc:45
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
struct ANativeWindow ANativeWindow