From ac45ecf7a20d34d0f120f78eeca004c12c7f7fd6 Mon Sep 17 00:00:00 2001 From: dyen Date: Fri, 6 Nov 2015 09:40:56 -0800 Subject: Re-land: Converted video frame and image callbacks to use new sync tokens. This reverts commit a1ab22a90140fe9e6c669998f3efc52795e569e2. Original issue's description: > Converted video frame and image callbacks to use new sync tokens. > > As an incremental step towards utilizing the new sync tokens, this > CL converts existing video frame and image sync points to use > sync tokens instead. > > In order to accomplish this, the GpuCommandBufferMsg_CreateImage > IPC message has been modified to accept a fence_release parameter > so that it can act as a sync token IPC. > > A new SyncPointClientWaiter concept has also added which can wait > on other sync point clients without an associated order number. > This only works because the SyncPointClientWaiter cannot be waited > on so no deadlocks can occur. > > BUG=514815 > CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel > > Committed: https://crrev.com/c7aff68a0c11820cc2b8d488851c682c0d32cd2b > Cr-Commit-Position: refs/heads/master@{#357997} BUG=514815 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1427893003 Cr-Commit-Position: refs/heads/master@{#358346} --- media/renderers/skcanvas_video_renderer.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'media/renderers') diff --git a/media/renderers/skcanvas_video_renderer.cc b/media/renderers/skcanvas_video_renderer.cc index 675839b..d2f25d6 100644 --- a/media/renderers/skcanvas_video_renderer.cc +++ b/media/renderers/skcanvas_video_renderer.cc @@ -63,7 +63,11 @@ class SyncTokenClientImpl : public VideoFrame::SyncTokenClient { public: explicit SyncTokenClientImpl(gpu::gles2::GLES2Interface* gl) : gl_(gl) {} ~SyncTokenClientImpl() override {} - uint32 InsertSyncPoint() override { return gl_->InsertSyncPointCHROMIUM(); } + void GenerateSyncToken(gpu::SyncToken* sync_token) override { + const uint64_t fence_sync = gl_->InsertFenceSyncCHROMIUM(); + gl_->ShallowFlushCHROMIUM(); + gl_->GenSyncTokenCHROMIUM(fence_sync, sync_token->GetData()); + } void WaitSyncToken(const gpu::SyncToken& sync_token) override { gl_->WaitSyncTokenCHROMIUM(sync_token.GetConstData()); } -- cgit v1.1