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

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

Issue 977853002: Reland of Revert of gpu: introduce glCopySubTextureCHROMIUM (patchset #1 id:1 of https://codereview… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Apply image opt when offsets are zero 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 d3b0dcbf0ebd69ab335dd6b38c96900459bea07d..47c37bdb1cef1d0ac8911bedde353458b31a9608 100644
--- a/content/renderer/media/android/webmediaplayer_android.cc
+++ b/content/renderer/media/android/webmediaplayer_android.cc
@@ -643,6 +643,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_)
@@ -679,9 +691,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