| Index: content/browser/renderer_host/media/video_capture_controller.cc
|
| diff --git a/content/browser/renderer_host/media/video_capture_controller.cc b/content/browser/renderer_host/media/video_capture_controller.cc
|
| index 53c2110d80701867f525d1c968d85a0d1414c226..e56c88be433a1117774f27cccc195f82544afbc6 100644
|
| --- a/content/browser/renderer_host/media/video_capture_controller.cc
|
| +++ b/content/browser/renderer_host/media/video_capture_controller.cc
|
| @@ -46,8 +46,9 @@ class SyncPointClientImpl : public VideoFrame::SyncPointClient {
|
| explicit SyncPointClientImpl(GLHelper* gl_helper) : gl_helper_(gl_helper) {}
|
| ~SyncPointClientImpl() override {}
|
| uint32 InsertSyncPoint() override { return gl_helper_->InsertSyncPoint(); }
|
| - void WaitSyncPoint(uint32 sync_point) override {
|
| - gl_helper_->WaitSyncPoint(sync_point);
|
| + void WaitSyncPoint(uint32 sync_point,
|
| + const gpu::SyncToken& sync_token) override {
|
| + gl_helper_->WaitSyncPoint(sync_point, sync_token);
|
| }
|
|
|
| private:
|
| @@ -55,7 +56,8 @@ class SyncPointClientImpl : public VideoFrame::SyncPointClient {
|
| };
|
|
|
| void ReturnVideoFrame(const scoped_refptr<VideoFrame>& video_frame,
|
| - uint32 sync_point) {
|
| + uint32 sync_point,
|
| + const gpu::SyncToken& sync_token) {
|
| DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| #if defined(OS_ANDROID)
|
| NOTREACHED();
|
| @@ -64,7 +66,7 @@ void ReturnVideoFrame(const scoped_refptr<VideoFrame>& video_frame,
|
| // UpdateReleaseSyncPoint() creates a new sync_point using |gl_helper|, so
|
| // wait the given |sync_point| using |gl_helper|.
|
| if (gl_helper) {
|
| - gl_helper->WaitSyncPoint(sync_point);
|
| + gl_helper->WaitSyncPoint(sync_point, sync_token);
|
| SyncPointClientImpl client(gl_helper);
|
| video_frame->UpdateReleaseSyncPoint(&client);
|
| }
|
| @@ -254,6 +256,7 @@ void VideoCaptureController::ReturnBuffer(
|
| VideoCaptureControllerEventHandler* event_handler,
|
| int buffer_id,
|
| uint32 sync_point,
|
| + const gpu::SyncToken& sync_token,
|
| double consumer_resource_utilization) {
|
| DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
|
|
| @@ -293,11 +296,12 @@ void VideoCaptureController::ReturnBuffer(
|
|
|
| #if defined(OS_ANDROID)
|
| DCHECK_EQ(0u, sync_point);
|
| + DCHECK_FALSE(sync_token.HasData());
|
| #endif
|
| if (sync_point)
|
| - BrowserThread::PostTask(BrowserThread::UI,
|
| - FROM_HERE,
|
| - base::Bind(&ReturnVideoFrame, frame, sync_point));
|
| + BrowserThread::PostTask(
|
| + BrowserThread::UI, FROM_HERE,
|
| + base::Bind(&ReturnVideoFrame, frame, sync_point, sync_token));
|
| }
|
|
|
| const media::VideoCaptureFormat&
|
|
|