From ad967fceb22d9758145bd6e1060be6015de6b52e Mon Sep 17 00:00:00 2001 From: egdaniel Date: Mon, 16 Apr 2018 10:21:53 -0400 Subject: [PATCH] Call SkSurface::flush instead of getting a backend handle in vulkan_swapchain. (flutter/engine#5012) The old code called getBackendRenderTargetHandle() with a Read access to trigger the surface to flush, however the returned GrVkImageInfo was never used. This how process is equivalent to just calling flush on the surface so do that instead. --- engine/src/flutter/vulkan/vulkan_swapchain.cc | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/engine/src/flutter/vulkan/vulkan_swapchain.cc b/engine/src/flutter/vulkan/vulkan_swapchain.cc index cf1588314a..2eb6d6e1c7 100644 --- a/engine/src/flutter/vulkan/vulkan_swapchain.cc +++ b/engine/src/flutter/vulkan/vulkan_swapchain.cc @@ -486,15 +486,9 @@ bool VulkanSwapchain::Submit() { // --------------------------------------------------------------------------- // Step 0: - // Notify to Skia that we will read from its backend object. + // Make sure Skia has flushed all work for the surface to the gpu. // --------------------------------------------------------------------------- - GrVkImageInfo* image_info = nullptr; - if (!surface->getRenderTargetHandle( - reinterpret_cast(&image_info), - SkSurface::kFlushRead_BackendHandleAccess)) { - FXL_DLOG(INFO) << "Could not get render target handle."; - return false; - } + surface->flush(); // --------------------------------------------------------------------------- // Step 1: