#include <vulkan_swapchain.h>
Public Types | |
| enum class | AcquireStatus { Success , ErrorSurfaceLost , ErrorSurfaceOutOfDate } |
| using | AcquireResult = std::pair< AcquireStatus, sk_sp< SkSurface > > |
Public Member Functions | |
| VulkanSwapchain (const VulkanProcTable &vk, const VulkanDevice &device, const VulkanSurface &surface, GrDirectContext *skia_context, std::unique_ptr< VulkanSwapchain > old_swapchain, uint32_t queue_family_index) | |
| ~VulkanSwapchain () | |
| bool | IsValid () const |
| AcquireResult | AcquireSurface () |
| bool | Submit () |
| SkISize | GetSize () const |
| FML_DISALLOW_COPY_AND_ASSIGN (VulkanSwapchain) | |
Definition at line 25 of file vulkan_swapchain.h.
| using vulkan::VulkanSwapchain::AcquireResult = std::pair<AcquireStatus, sk_sp<SkSurface> > |
Definition at line 49 of file vulkan_swapchain.h.
|
strong |
Definition at line 38 of file vulkan_swapchain.h.
| vulkan::VulkanSwapchain::VulkanSwapchain | ( | const VulkanProcTable & | vk, |
| const VulkanDevice & | device, | ||
| const VulkanSurface & | surface, | ||
| GrDirectContext * | skia_context, | ||
| std::unique_ptr< VulkanSwapchain > | old_swapchain, | ||
| uint32_t | queue_family_index | ||
| ) |
Definition at line 45 of file vulkan_swapchain.cc.
References color_space_, color_type_, vulkan::DesiredFormatInfos(), FML_DLOG, i, queue_family_index, surface, swapchain, and VK_CALL_LOG_ERROR.
|
default |
| VulkanSwapchain::AcquireResult vulkan::VulkanSwapchain::AcquireSurface | ( | ) |
Acquire an SkSurface from the swapchain for the caller to render into for later submission via |Submit|. There must not be consecutive calls to |AcquireFrame| without and interleaving |Submit|.
Definition at line 334 of file vulkan_swapchain.cc.
References error, ErrorSurfaceLost, ErrorSurfaceOutOfDate, FML_DLOG, FML_LOG, image, IsValid(), Success, surface, and VK_CALL_LOG_ERROR.
| vulkan::VulkanSwapchain::FML_DISALLOW_COPY_AND_ASSIGN | ( | VulkanSwapchain | ) |
| SkISize vulkan::VulkanSwapchain::GetSize | ( | ) | const |
Definition at line 202 of file vulkan_swapchain.cc.
| bool vulkan::VulkanSwapchain::IsValid | ( | ) | const |
Definition at line 174 of file vulkan_swapchain.cc.
Referenced by AcquireSurface(), and Submit().
| bool vulkan::VulkanSwapchain::Submit | ( | ) |
Submit a previously acquired. There must not be consecutive calls to |Submit| without and interleaving |AcquireFrame|.
Definition at line 495 of file vulkan_swapchain.cc.
References FML_DLOG, image, IsValid(), surface, swapchain, and VK_CALL_LOG_ERROR.