| Flutter Impeller |

Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
impeller::SwapchainVK Class Referenceabstract

A swapchain that adapts to the underlying surface going out of date. If the caller cannot acquire the next drawable, it is due to an unrecoverable error and the swapchain must be recreated with a new surface. More...

`#include <swapchain_vk.h>`

Inheritance diagram for impeller::SwapchainVK:

## Public Member Functions
virtual | ~SwapchainVK ()
| SwapchainVK (const SwapchainVK &)=delete
SwapchainVK & | operator= (const SwapchainVK &)=delete
virtual bool | IsValid () const =0
virtual std::unique_ptr< Surface > | AcquireNextDrawable ()=0
virtual vk::Format | GetSurfaceFormat () const =0
virtual void | AddFinalCommandBuffer (std::shared_ptr< CommandBuffer > cmd_buffer) const =0
virtual void | UpdateSurfaceSize (const ISize &size)=0
| Mark the current swapchain configuration as dirty, forcing it to be recreated on the next frame. More...

## Static Public Member Functions
static std::shared_ptr< SwapchainVK > | Create (const std::shared_ptr< Context > &context, vk::UniqueSurfaceKHR surface, const ISize &size, bool enable_msaa=true)

## Protected Member Functions
| SwapchainVK ()

## Detailed Description

A swapchain that adapts to the underlying surface going out of date. If the caller cannot acquire the next drawable, it is due to an unrecoverable error and the swapchain must be recreated with a new surface.

Definition at line 34 of file swapchain_vk.h.

## Constructor & Destructor Documentation

## ◆ ~SwapchainVK()

impeller::SwapchainVK::~SwapchainVK | ( |  | ) |
| virtualdefault

## ◆ SwapchainVK() [1/2]

impeller::SwapchainVK::SwapchainVK | ( | const SwapchainVK & |  | ) |
| delete

## ◆ SwapchainVK() [2/2]

impeller::SwapchainVK::SwapchainVK | ( |  | ) |
| protecteddefault

## Member Function Documentation

## ◆ AcquireNextDrawable()

virtual std::unique_ptr<Surface> impeller::SwapchainVK::AcquireNextDrawable | ( |  | ) |
| pure virtual

Implemented in impeller::KHRSwapchainVK, and impeller::AHBSwapchainVK.

## ◆ AddFinalCommandBuffer()

virtual void impeller::SwapchainVK::AddFinalCommandBuffer | ( | std::shared_ptr< CommandBuffer > | cmd_buffer | ) | const
| pure virtual

Implemented in impeller::KHRSwapchainVK, and impeller::AHBSwapchainVK.

## ◆ Create()

std::shared_ptr< SwapchainVK > impeller::SwapchainVK::Create | ( | const std::shared_ptr< Context > & | context,
|  | vk::UniqueSurfaceKHR | surface,
|  | const ISize & | size,
|  | bool | enable_msaa = `true`
| ) |  |
| static

Definition at line 18 of file swapchain_vk.cc.

22 {
23 auto swapchain = std::shared_ptr<KHRSwapchainVK>(
24 new KHRSwapchainVK(context, std::move(surface), size, enable_msaa));
25 if (!swapchain->IsValid()) {
26 VALIDATION_LOG << "Could not create valid swapchain.";
27 return nullptr;
28 }
29 return swapchain;
30 }
VALIDATION_LOG
#define VALIDATION_LOG
Definition: validation.h:91

References VALIDATION_LOG.

Referenced by impeller::SurfaceContextVK::SetWindowSurface(), and impeller::interop::SwapchainVK::SwapchainVK().

## ◆ GetSurfaceFormat()

virtual vk::Format impeller::SwapchainVK::GetSurfaceFormat | ( |  | ) | const
| pure virtual

Implemented in impeller::KHRSwapchainVK, and impeller::AHBSwapchainVK.

## ◆ IsValid()

virtual bool impeller::SwapchainVK::IsValid | ( |  | ) | const
| pure virtual

Implemented in impeller::KHRSwapchainVK, and impeller::AHBSwapchainVK.

## ◆ operator=()

SwapchainVK& impeller::SwapchainVK::operator= | ( | const SwapchainVK & |  | ) |
| delete

## ◆ UpdateSurfaceSize()

virtual void impeller::SwapchainVK::UpdateSurfaceSize | ( | const ISize & | size | ) |
| pure virtual

Mark the current swapchain configuration as dirty, forcing it to be recreated on the next frame.

Implemented in impeller::KHRSwapchainVK, and impeller::AHBSwapchainVK.

The documentation for this class was generated from the following files:

- impeller/renderer/backend/vulkan/swapchain/swapchain_vk.h
- impeller/renderer/backend/vulkan/swapchain/swapchain_vk.cc