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

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: c301e01d Rebase. Created 6 years, 12 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/renderer/media/webmediaplayer_impl.cc
diff --git a/content/renderer/media/webmediaplayer_impl.cc b/content/renderer/media/webmediaplayer_impl.cc
index 68eafa1e0378d4acc7ff4818015f1ca5c20f01f8..b3040f5799dd1c2fa6691db4a17cab4155324d98 100644
--- a/content/renderer/media/webmediaplayer_impl.cc
+++ b/content/renderer/media/webmediaplayer_impl.cc
@@ -634,7 +634,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->texture_target != GL_TEXTURE_2D)
return false;
// Since this method changes which texture is bound to the TEXTURE_2D target,
@@ -649,15 +651,12 @@ 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());
+ web_graphics_context->waitSyncPoint(mailbox_holder->sync_point);
web_graphics_context->bindTexture(GL_TEXTURE_2D, source_texture);
web_graphics_context->consumeTextureCHROMIUM(GL_TEXTURE_2D,
- mailbox_holder->mailbox().name);
+ mailbox_holder->mailbox.name);
// The video is stored in a unmultiplied format, so premultiply
// if necessary.

Powered by Google App Engine
This is Rietveld 408576698