From a3613c9d5f43b495244805ec4941fa2b41c82733 Mon Sep 17 00:00:00 2001 From: egdaniel Date: Thu, 12 Apr 2018 14:06:28 -0400 Subject: [PATCH] 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 --- engine/src/flutter/vulkan/vulkan_swapchain.cc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/engine/src/flutter/vulkan/vulkan_swapchain.cc b/engine/src/flutter/vulkan/vulkan_swapchain.cc index b00c8afc87..cf1588314a 100644 --- a/engine/src/flutter/vulkan/vulkan_swapchain.cc +++ b/engine/src/flutter/vulkan/vulkan_swapchain.cc @@ -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(&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};