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

Unified Diff: content/renderer/pepper/video_decoder_shim.cc

Issue 901683004: Pepper: Fix VideoDecoderShim texture upload. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fail on Android. 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/video_decoder_shim.cc
diff --git a/content/renderer/pepper/video_decoder_shim.cc b/content/renderer/pepper/video_decoder_shim.cc
index da84db90cd593be5d0e58f97e550ebe29b83bad8..c3e7e78c68a186cb4e7e2695fc41087518a882f4 100644
--- a/content/renderer/pepper/video_decoder_shim.cc
+++ b/content/renderer/pepper/video_decoder_shim.cc
@@ -523,15 +523,21 @@ void VideoDecoderShim::SendPictures() {
gpu::gles2::GLES2Interface* gles2 = context_provider_->ContextGL();
gles2->ActiveTexture(GL_TEXTURE0);
gles2->BindTexture(GL_TEXTURE_2D, local_texture_id);
+#if !defined(OS_ANDROID)
+ // BGRA is the native texture format, except on Android, where textures
+ // would be uploaded as GL_RGBA.
gles2->TexImage2D(GL_TEXTURE_2D,
0,
- GL_RGBA,
+ GL_BGRA_EXT,
texture_size_.width(),
texture_size_.height(),
0,
- GL_RGBA,
+ GL_BGRA_EXT,
GL_UNSIGNED_BYTE,
&frame->argb_pixels.front());
+#else
+#error Not implemented.
+#endif
host_->PictureReady(media::Picture(texture_id, frame->decode_id,
frame->visible_rect, false));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698