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

Unified Diff: content/common/gpu/media/android_video_decode_accelerator.cc

Issue 374193002: gpu: Optimize and cleanup code used for CHROMIUM_copy_texture. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nits 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/common/gpu/media/android_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/android_video_decode_accelerator.cc b/content/common/gpu/media/android_video_decode_accelerator.cc
index f72e1b257d77c8bc9f5c243ab2f1e34d5faad042..a9392de8a8b87f2f07ca5d225d490a102f1c55f7 100644
--- a/content/common/gpu/media/android_video_decode_accelerator.cc
+++ b/content/common/gpu/media/android_video_decode_accelerator.cc
@@ -357,10 +357,23 @@ void AndroidVideoDecodeAccelerator::SendCurrentSurfaceToClient(
// attached.
// 2. SurfaceTexture requires us to apply a transform matrix when we show
// the texture.
- copier_->DoCopyTexture(gl_decoder_.get(), GL_TEXTURE_EXTERNAL_OES,
- GL_TEXTURE_2D, surface_texture_id_,
- picture_buffer_texture_id, 0, size_.width(),
- size_.height(), false, false, false);
+ // TODO(hkuang): get the StreamTexture transform matrix in GPU process
+ // instead of using default matrix crbug.com/226218.
+ const static GLfloat default_matrix[16] = {1.0f, 0.0f, 0.0f, 0.0f,
+ 0.0f, 1.0f, 0.0f, 0.0f,
+ 0.0f, 0.0f, 1.0f, 0.0f,
+ 0.0f, 0.0f, 0.0f, 1.0f};
+ copier_->DoCopyTextureWithTransform(gl_decoder_.get(),
dshwang 2014/07/10 22:08:22 I changed here like gles2_cmd_decoder. Could you r
+ GL_TEXTURE_EXTERNAL_OES,
+ surface_texture_id_,
+ picture_buffer_texture_id,
+ 0,
+ size_.width(),
+ size_.height(),
+ false,
+ false,
+ false,
+ default_matrix);
base::MessageLoop::current()->PostTask(
FROM_HERE,

Powered by Google App Engine
This is Rietveld 408576698