Chromium Code Reviews| 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..09aaa67d531507434f3ce95945415649d019a067 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,25 @@ scoped_refptr<media::VideoFrame> SurfaceTextureTransportClient:: |
| context->bindTexture(GL_TEXTURE_EXTERNAL_OES, texture_id_); |
| context->flush(); |
| surface_texture_->AttachToGLContext(); |
| + |
| + context->genMailboxCHROMIUM(texture_mailbox_.name); |
| + context->bindTexture(kGLTextureExternalOES, texture_id_); |
|
piman
2013/06/14 21:47:29
nit: you just bound above.
danakj
2013/06/14 21:54:39
Done.
|
| + 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(); |