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

Unified Diff: content/renderer/media/android/webmediaplayer_android.cc

Issue 864513004: gpu: introduce glCopySubTextureCHROMIUM (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove level altogether Created 5 years, 10 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/android/webmediaplayer_android.cc
diff --git a/content/renderer/media/android/webmediaplayer_android.cc b/content/renderer/media/android/webmediaplayer_android.cc
index 3e45a9cba1fefe3b86967ea3c95fc5d7135b8b69..41c668e2c64b20f603d7912035b5d21cc57ea2d8 100644
--- a/content/renderer/media/android/webmediaplayer_android.cc
+++ b/content/renderer/media/android/webmediaplayer_android.cc
@@ -628,6 +628,18 @@ bool WebMediaPlayerAndroid::copyVideoTextureToPlatformTexture(
unsigned int type,
bool premultiply_alpha,
bool flip_y) {
+ return copyVideoTextureToPlatformTexture(web_graphics_context, texture,
+ internal_format, type,
+ premultiply_alpha, flip_y);
+}
+
+bool WebMediaPlayerAndroid::copyVideoTextureToPlatformTexture(
+ blink::WebGraphicsContext3D* web_graphics_context,
+ unsigned int texture,
+ unsigned int internal_format,
+ unsigned int type,
+ bool premultiply_alpha,
+ bool flip_y) {
DCHECK(main_thread_checker_.CalledOnValidThread());
// Don't allow clients to copy an encrypted video frame.
if (needs_external_surface_)
@@ -664,9 +676,8 @@ bool WebMediaPlayerAndroid::copyVideoTextureToPlatformTexture(
// flip_y==true means to reverse the video orientation while
// flip_y==false means to keep the intrinsic orientation.
web_graphics_context->pixelStorei(GL_UNPACK_FLIP_Y_CHROMIUM, flip_y);
- web_graphics_context->copyTextureCHROMIUM(GL_TEXTURE_2D, src_texture,
- texture, level, internal_format,
- type);
+ web_graphics_context->copyTextureCHROMIUM(GL_TEXTURE_2D, src_texture, texture,
+ 0, internal_format, type);
web_graphics_context->pixelStorei(GL_UNPACK_FLIP_Y_CHROMIUM, false);
web_graphics_context->pixelStorei(GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM,
false);

Powered by Google App Engine
This is Rietveld 408576698