Skip to content

Commit

Permalink
Revert "Use unverified sync tokens in PaintCanvasVideoRenderer"
Browse files Browse the repository at this point in the history
This reverts commit 228446b.

Reason for revert: Potentially causing flakes in virtual/android/fullscreen/video-fixed-background.html

Bug: 876466

Original change's description:
> Use unverified sync tokens in PaintCanvasVideoRenderer
> 
> PaintCanvasVideoRenderer::CopyVideoFrameTexturesToGLTexture
> unnecessarily used verified sync tokens to pass textures between
> Skia's context and WebGL's context. Verification isn't needed
> because these two clients are being used synchronously from the
> same process and thread.
> 
> Changing these sync tokens to be unverified gives us a nice
> speedup - on a simple mp4-to-WebGL case on Linux, the texImage2D
> blocking time drops from ~1.25 ms to ~0.70ms (~80% speedup).
> 
> Bug: 871417
> Change-Id: I38c246fdb49588eccc87211fa06a2abf00e55c5c
> Reviewed-on: https://chromium-review.googlesource.com/1164163
> Reviewed-by: Dan Sanders <[email protected]>
> Commit-Queue: Kai Ninomiya <[email protected]>
> Cr-Commit-Position: refs/heads/master@{#584840}

[email protected],[email protected]

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 871417
Change-Id: I51d3e5f9308eadf08babec4e1c99b1d51c4a3b90
Reviewed-on: https://chromium-review.googlesource.com/1192129
Reviewed-by: Kai Ninomiya <[email protected]>
Commit-Queue: Kai Ninomiya <[email protected]>
Cr-Commit-Position: refs/heads/master@{#586500}
  • Loading branch information
kainino0x authored and Commit Bot committed Aug 27, 2018
1 parent 21d3132 commit de9497d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions media/renderers/paint_canvas_video_renderer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -944,8 +944,7 @@ bool PaintCanvasVideoRenderer::CopyVideoFrameTexturesToGLTexture(

// Wait for mailbox creation on canvas context before consuming it and
// copying from it on the consumer context.
canvas_gl->GenUnverifiedSyncTokenCHROMIUM(
mailbox_holder.sync_token.GetData());
canvas_gl->GenSyncTokenCHROMIUM(mailbox_holder.sync_token.GetData());

destination_gl->WaitSyncTokenCHROMIUM(
mailbox_holder.sync_token.GetConstData());
Expand All @@ -962,7 +961,7 @@ bool PaintCanvasVideoRenderer::CopyVideoFrameTexturesToGLTexture(
// Wait for destination context to consume mailbox before deleting it in
// canvas context.
gpu::SyncToken dest_sync_token;
destination_gl->GenUnverifiedSyncTokenCHROMIUM(dest_sync_token.GetData());
destination_gl->GenSyncTokenCHROMIUM(dest_sync_token.GetData());
canvas_gl->WaitSyncTokenCHROMIUM(dest_sync_token.GetConstData());

SyncTokenClientImpl client(canvas_gl);
Expand Down

0 comments on commit de9497d

Please sign in to comment.