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

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: 89bedb8c Reference return. Created 6 years, 11 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..1aaa91b32bd58fddf70d514cf3c8f23b75cfcecf 100644
--- a/content/renderer/media/webmediaplayer_impl.cc
+++ b/content/renderer/media/webmediaplayer_impl.cc
@@ -33,6 +33,7 @@
#include "content/renderer/pepper/pepper_webplugin_impl.h"
#include "content/renderer/render_thread_impl.h"
#include "gpu/GLES2/gl2extchromium.h"
+#include "gpu/command_buffer/common/mailbox_holder.h"
#include "media/audio/null_audio_sink.h"
#include "media/base/bind_to_loop.h"
#include "media/base/filter_collection.h"
@@ -634,7 +635,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 +652,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