12 : context_(
Ref(&context)) {
25 auto surface = vk::UniqueSurfaceKHR(
26 vk::SurfaceKHR{c_surface},
36 swapchain_ = std::move(swapchain);
42 return swapchain_ && swapchain_->IsValid();
51 context_vk.DisposeThreadLocalCachedResources();
53 auto impeller_surface = swapchain_->AcquireNextDrawable();
54 if (!impeller_surface) {
59 auto surface = Create<SurfaceVK>(*context_, std::move(impeller_surface));
60 if (!surface || !surface->IsValid()) {
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)
std::shared_ptr< impeller::Context > GetContext() const
SwapchainVK(Context &context, VkSurfaceKHR surface)
ScopedObject< SurfaceVK > AcquireNextSurface()
ScopedObject< Object > Ref(Object *object)
static constexpr TSize MakeWH(Type width, Type height)