15 std::unique_ptr<VulkanNativeSurface> native_surface)
17 application_(application),
18 native_surface_(
std::move(native_surface)),
20 if (native_surface_ ==
nullptr || !native_surface_->IsValid()) {
21 FML_DLOG(INFO) <<
"Native surface was invalid.";
26 native_surface_->CreateSurfaceHandle(vk, application.
GetInstance());
29 FML_DLOG(INFO) <<
"Could not create the surface handle.";
52 return *native_surface_;
56 return valid_ ? native_surface_->GetSize() :
SkISize::Make(0, 0);
const VulkanHandle< VkInstance > & GetInstance() const
SkISize GetSize() const
Returns the current size of the surface or (0, 0) if invalid.
const VulkanNativeSurface & GetNativeSurface() const
const VulkanHandle< VkSurfaceKHR > & Handle() const
VulkanSurface(VulkanProcTable &vk, VulkanApplication &application, std::unique_ptr< VulkanNativeSurface > native_surface)
#define FML_DLOG(severity)
static constexpr SkISize Make(int32_t w, int32_t h)