Skip to content

Commit

Permalink
Call SkSurface::flush instead of getting a backend handle in vulkan_s…
Browse files Browse the repository at this point in the history
…wapchain. (flutter#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.
  • Loading branch information
egdaniel authored and brianosman committed Apr 16, 2018
1 parent f4ebb18 commit 62aeab7
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions vulkan/vulkan_swapchain.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 62aeab7

Please sign in to comment.