Index: content/renderer/media/android/webmediaplayer_android.cc |
diff --git a/content/renderer/media/android/webmediaplayer_android.cc b/content/renderer/media/android/webmediaplayer_android.cc |
index 419aee199185af9de76345e7e2d198f60385c2f0..13f2660213d63fad1c72f91d7ac147055030f4c4 100644 |
--- a/content/renderer/media/android/webmediaplayer_android.cc |
+++ b/content/renderer/media/android/webmediaplayer_android.cc |
@@ -72,12 +72,29 @@ const char* kMediaEme = "Media.EME."; |
void OnReleaseTexture( |
const scoped_refptr<content::StreamTextureFactory>& factories, |
uint32 texture_id, |
- const std::vector<uint32>& release_sync_points) { |
+ uint32 release_sync_point) { |
GLES2Interface* gl = factories->ContextGL(); |
- for (size_t i = 0; i < release_sync_points.size(); i++) |
- gl->WaitSyncPointCHROMIUM(release_sync_points[i]); |
+ gl->WaitSyncPointCHROMIUM(release_sync_point); |
gl->DeleteTextures(1, &texture_id); |
} |
+ |
+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 { |
@@ -539,7 +556,9 @@ bool WebMediaPlayerAndroid::copyVideoTextureToPlatformTexture( |
web_graphics_context->bindTexture(GL_TEXTURE_2D, texture); |
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; |
} |