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.
This commit is contained in:
egdaniel
2018-04-16 10:21:53 -04:00
committed by Brian Osman
parent d0165f0163
commit ad967fceb2

View File

@@ -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<GrBackendObject*>(&image_info),
SkSurface::kFlushRead_BackendHandleAccess)) {
FXL_DLOG(INFO) << "Could not get render target handle.";
return false;
}
surface->flush();
// ---------------------------------------------------------------------------
// Step 1: