#include <swapchain_vk.h>
Definition at line 16 of file swapchain_vk.h.
◆ SwapchainVK() [1/2]
| impeller::interop::SwapchainVK::SwapchainVK |
( |
Context & |
context, |
|
|
VkSurfaceKHR |
surface |
|
) |
| |
Definition at line 11 of file swapchain_vk.cc.
12 : context_(
Ref(&context)) {
13 if (!context.IsVulkan()) {
15 return;
16 }
17
18 if (!c_surface) {
20 return;
21 }
22
23
24
25 auto surface = vk::UniqueSurfaceKHR(
26 vk::SurfaceKHR{c_surface},
29 std::move(surface),
31 );
32 if (!swapchain) {
34 return;
35 }
36 swapchain_ = std::move(swapchain);
37}
static ContextVK & Cast(Context &base)
vk::Instance GetInstance() const
static std::shared_ptr< SwapchainVK > Create(const std::shared_ptr< Context > &context, vk::UniqueSurfaceKHR surface, const ISize &size, bool enable_msaa=true)
ScopedObject< Object > Ref(Object *object)
static constexpr TSize MakeWH(Type width, Type height)
References impeller::BackendCast< ContextVK, Context >::Cast(), impeller::SwapchainVK::Create(), impeller::interop::Context::GetContext(), impeller::ContextVK::GetInstance(), impeller::interop::Context::IsVulkan(), impeller::TSize< T >::MakeWH(), surface, swapchain, and VALIDATION_LOG.
◆ ~SwapchainVK()
| impeller::interop::SwapchainVK::~SwapchainVK |
( |
| ) |
|
|
default |
◆ SwapchainVK() [2/2]
| impeller::interop::SwapchainVK::SwapchainVK |
( |
const SwapchainVK & |
| ) |
|
|
delete |
◆ AcquireNextSurface()
Definition at line 45 of file swapchain_vk.cc.
45 {
47 return nullptr;
48 }
49
50 auto impeller_surface = swapchain_->AcquireNextDrawable();
51 if (!impeller_surface) {
53 return nullptr;
54 }
55
56 auto surface = Create<SurfaceVK>(*context_, std::move(impeller_surface));
57 if (!surface || !
surface->IsValid()) {
59 return nullptr;
60 }
61
63}
References IsValid(), surface, and VALIDATION_LOG.
◆ IsValid()
| bool impeller::interop::SwapchainVK::IsValid |
( |
| ) |
const |
◆ operator=()
The documentation for this class was generated from the following files: