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

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

Issue 371463009: Making use of bindless variants mailbox produce/consume on remainders. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix cc tests Created 6 years, 5 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 dccea32354f36909709cf5706ef07c73837b33ee..e385197bb2bf4a4a83ec3afa56ba7994df593e01 100644
--- a/content/renderer/media/webmediaplayer_impl.cc
+++ b/content/renderer/media/webmediaplayer_impl.cc
@@ -621,12 +621,9 @@ bool WebMediaPlayerImpl::copyVideoTextureToPlatformTexture(
DCHECK_EQ(static_cast<GLuint>(bound_texture), texture);
#endif
- uint32 source_texture = web_graphics_context->createTexture();
-
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);
+ uint32 source_texture = web_graphics_context->createAndConsumeTextureCHROMIUM(
+ GL_TEXTURE_2D, mailbox_holder->mailbox.name);
// The video is stored in a unmultiplied format, so premultiply
// if necessary.
@@ -647,9 +644,6 @@ bool WebMediaPlayerImpl::copyVideoTextureToPlatformTexture(
web_graphics_context->pixelStorei(GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM,
false);
- // Restore the state for TEXTURE_2D binding point as mentioned above.
- web_graphics_context->bindTexture(GL_TEXTURE_2D, texture);
-
web_graphics_context->deleteTexture(source_texture);
web_graphics_context->flush();
video_frame->AppendReleaseSyncPoint(web_graphics_context->insertSyncPoint());
« no previous file with comments | « content/renderer/media/android/webmediaplayer_android.cc ('k') | content/renderer/pepper/video_decoder_shim.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698