Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1050)

Unified Diff: content/browser/renderer_host/surface_texture_transport_client_android.cc

Issue 14199002: Send hardware video frames with mailboxes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: video-mailbox: virtualandroid Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..b563480efd94c65fc168c68116c0f3849ed87c61 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,11 +105,20 @@ 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,
+ new media::VideoFrame::MailboxHolder(
+ texture_mailbox_,
+ texture_mailbox_sync_point_,
+ media::VideoFrame::MailboxHolder::TextureNoLongerNeededCallback()),
+ kGLTextureExternalOES,
size,
gfx::Rect(gfx::Point(), size),
size,

Powered by Google App Engine
This is Rietveld 408576698