Update skia vulkan usages to use getBackendRenderTarget. (flutter/engine#4982)
* Update vulkan_swampchain.cc to use getBackendRenderTarget. The use of getRenderTargetHandle on SkSurface is being removed so switch over to the new API of getBackendRenderTarget. * Update vulkan_swapchain.cc * Update vulkan_surface_producer.cc
This commit is contained in:
@@ -460,16 +460,15 @@ VulkanSwapchain::AcquireResult VulkanSwapchain::AcquireSurface() {
|
||||
FXL_DLOG(INFO) << "Could not access surface at the image index.";
|
||||
return error;
|
||||
}
|
||||
|
||||
GrVkImageInfo* image_info = nullptr;
|
||||
if (!surface->getRenderTargetHandle(
|
||||
reinterpret_cast<GrBackendObject*>(&image_info),
|
||||
SkSurface::kFlushRead_BackendHandleAccess)) {
|
||||
FXL_DLOG(INFO) << "Could not get render target handle.";
|
||||
|
||||
GrBackendRenderTarget backendRT = surface->getBackendRenderTarget(
|
||||
SkSurface::kFlushRead_BackendHandleAccess);
|
||||
if (!backendRT.isValid()) {
|
||||
FXL_DLOG(INFO) << "Could not get backend render target.";
|
||||
return error;
|
||||
}
|
||||
backendRT.setVkImageLayout(destination_image_layout);
|
||||
|
||||
image_info->updateImageLayout(destination_image_layout);
|
||||
current_image_index_ = next_image_index;
|
||||
|
||||
return {AcquireStatus::Success, surface};
|
||||
|
||||
Reference in New Issue
Block a user