Index: cc/resources/video_resource_updater.cc |
diff --git a/cc/resources/video_resource_updater.cc b/cc/resources/video_resource_updater.cc |
index c0d6923fcf11724b20d5a06714a14862bbec59d5..ce6bee043d3a94a7762370b3139fea119545dab1 100644 |
--- a/cc/resources/video_resource_updater.cc |
+++ b/cc/resources/video_resource_updater.cc |
@@ -27,15 +27,18 @@ const ResourceFormat kRGBResourceFormat = RGBA_8888; |
class SyncPointClientImpl : public media::VideoFrame::SyncPointClient { |
public: |
- explicit SyncPointClientImpl(gpu::gles2::GLES2Interface* gl) : gl_(gl) {} |
+ explicit SyncPointClientImpl(gpu::gles2::GLES2Interface* gl, |
+ uint32 sync_point) |
+ : gl_(gl), sync_point_(sync_point) {} |
~SyncPointClientImpl() override {} |
- uint32 InsertSyncPoint() override { return gl_->InsertSyncPointCHROMIUM(); } |
+ uint32 InsertSyncPoint() override { return sync_point_; } |
void WaitSyncPoint(uint32 sync_point) override { |
gl_->WaitSyncPointCHROMIUM(sync_point); |
} |
private: |
gpu::gles2::GLES2Interface* gl_; |
+ uint32 sync_point_; |
}; |
} // namespace |
@@ -378,7 +381,8 @@ void VideoResourceUpdater::ReturnTexture( |
// VideoFrame::UpdateReleaseSyncPoint() creates new sync point using the same |
danakj
2015/04/14 15:56:27
What about this comment? Why is it wrong?
llandwerlin-old
2015/04/14 16:21:54
Thanks, I will update the comment.
It's wrong bec
|
// GL context which created the given |sync_point|, so discard the |
// |sync_point|. |
- SyncPointClientImpl client(updater->context_provider_->ContextGL()); |
+ SyncPointClientImpl client(updater->context_provider_->ContextGL(), |
+ sync_point); |
video_frame->UpdateReleaseSyncPoint(&client); |
} |