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

Unified Diff: content/renderer/media/webmediaplayer_impl.cc

Issue 105743004: Add gpu::MailboxHolder to hold state for a gpu::Mailbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cc2a95fe Android fixes. Created 7 years 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/renderer/media/webmediaplayer_impl.cc
diff --git a/content/renderer/media/webmediaplayer_impl.cc b/content/renderer/media/webmediaplayer_impl.cc
index 929c74c149f10d76eed58e41845f4ac08701404e..40d1c6e107873baf9539ebcdcc30cd755bb3eb57 100644
--- a/content/renderer/media/webmediaplayer_impl.cc
+++ b/content/renderer/media/webmediaplayer_impl.cc
@@ -637,7 +637,9 @@ bool WebMediaPlayerImpl::copyVideoTextureToPlatformTexture(
return false;
if (video_frame->format() != media::VideoFrame::NATIVE_TEXTURE)
return false;
- if (video_frame->texture_target() != GL_TEXTURE_2D)
+
+ gpu::MailboxHolder* mailbox_holder = video_frame->mailbox_holder();
+ if (mailbox_holder->target() != GL_TEXTURE_2D)
return false;
// Since this method changes which texture is bound to the TEXTURE_2D target,
@@ -652,9 +654,6 @@ bool WebMediaPlayerImpl::copyVideoTextureToPlatformTexture(
DCHECK_EQ(static_cast<GLuint>(bound_texture), texture);
}
- media::VideoFrame::MailboxHolder* mailbox_holder =
- video_frame->texture_mailbox();
-
uint32 source_texture = web_graphics_context->createTexture();
web_graphics_context->waitSyncPoint(mailbox_holder->sync_point());

Powered by Google App Engine
This is Rietveld 408576698