Index: content/renderer/media/webmediaplayer_impl.cc |
diff --git a/content/renderer/media/webmediaplayer_impl.cc b/content/renderer/media/webmediaplayer_impl.cc |
index dccea32354f36909709cf5706ef07c73837b33ee..a380241050f3c8910d736f15d3d63343797e2205 100644 |
--- a/content/renderer/media/webmediaplayer_impl.cc |
+++ b/content/renderer/media/webmediaplayer_impl.cc |
@@ -118,6 +118,23 @@ const double kMaxRate = 16.0; |
// Prefix for histograms related to Encrypted Media Extensions. |
const char* kMediaEme = "Media.EME."; |
+class SyncPointClientImpl : public media::VideoFrame::SyncPointClient { |
+ public: |
+ explicit SyncPointClientImpl( |
+ blink::WebGraphicsContext3D* web_graphics_context) |
+ : web_graphics_context_(web_graphics_context) {} |
+ virtual ~SyncPointClientImpl() {} |
+ virtual uint32 InsertSyncPoint() OVERRIDE { |
+ return web_graphics_context_->insertSyncPoint(); |
+ } |
+ virtual void WaitSyncPoint(uint32 sync_point) OVERRIDE { |
+ web_graphics_context_->waitSyncPoint(sync_point); |
+ } |
+ |
+ private: |
+ blink::WebGraphicsContext3D* web_graphics_context_; |
+}; |
+ |
} // namespace |
namespace content { |
@@ -652,7 +669,9 @@ bool WebMediaPlayerImpl::copyVideoTextureToPlatformTexture( |
web_graphics_context->deleteTexture(source_texture); |
web_graphics_context->flush(); |
- video_frame->AppendReleaseSyncPoint(web_graphics_context->insertSyncPoint()); |
+ |
+ SyncPointClientImpl client(web_graphics_context); |
+ video_frame->UpdateReleaseSyncPoint(&client); |
return true; |
} |