Index: content/browser/renderer_host/surface_texture_transport_client_android.cc |
diff --git a/content/browser/renderer_host/surface_texture_transport_client_android.cc b/content/browser/renderer_host/surface_texture_transport_client_android.cc |
index 17ffe7b7d1743c71541b553b6f21f3402bbda77f..2577bd982e0e59681822326371dc32263b0dc76a 100644 |
--- a/content/browser/renderer_host/surface_texture_transport_client_android.cc |
+++ b/content/browser/renderer_host/surface_texture_transport_client_android.cc |
@@ -48,6 +48,7 @@ class SurfaceRefAndroid : public GpuSurfaceTracker::SurfaceRef { |
SurfaceTextureTransportClient::SurfaceTextureTransportClient() |
: window_(NULL), |
texture_id_(0), |
+ texture_mailbox_sync_point_(0), |
surface_id_(0), |
weak_factory_(this) { |
} |
@@ -104,16 +105,24 @@ scoped_refptr<media::VideoFrame> SurfaceTextureTransportClient:: |
context->bindTexture(GL_TEXTURE_EXTERNAL_OES, texture_id_); |
context->flush(); |
surface_texture_->AttachToGLContext(); |
+ |
+ context->genMailboxCHROMIUM(texture_mailbox_.name); |
+ context->produceTextureCHROMIUM(kGLTextureExternalOES, |
+ texture_mailbox_.name); |
+ texture_mailbox_sync_point_ = context->insertSyncPoint(); |
} |
if (!video_frame_.get()) { |
const gfx::Size size = video_layer_->bounds(); |
video_frame_ = media::VideoFrame::WrapNativeTexture( |
- texture_id_, kGLTextureExternalOES, |
+ texture_mailbox_, |
+ texture_mailbox_sync_point_, |
+ kGLTextureExternalOES, |
size, |
gfx::Rect(gfx::Point(), size), |
size, |
base::TimeDelta(), |
media::VideoFrame::ReadPixelsCB(), |
+ media::VideoFrame::TextureNoLongerNeededCallback(), |
base::Closure()); |
} |
surface_texture_->UpdateTexImage(); |