Flutter Impeller
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:
impeller::AHBSwapchainVK impeller::KHRSwapchainVK

Public Member Functions

virtual ~SwapchainVK ()
 
 SwapchainVK (const SwapchainVK &)=delete
 
SwapchainVKoperator= (const SwapchainVK &)=delete
 
virtual bool IsValid () const =0
 
virtual std::unique_ptr< SurfaceAcquireNextDrawable ()=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< SwapchainVKCreate (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

◆ AddFinalCommandBuffer()

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

◆ 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 }
#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

◆ IsValid()

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

◆ 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: