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

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

Issue 1814703002: AVDA: Use the SurfaceTexture matrix when copying on destruction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « content/common/gpu/media/android_copying_backing_strategy.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/android_deferred_rendering_backing_strategy.cc
diff --git a/content/common/gpu/media/android_deferred_rendering_backing_strategy.cc b/content/common/gpu/media/android_deferred_rendering_backing_strategy.cc
index dcb5d453af05da2e6daff14f9659466fb2a78753..b96782b601b85891a41c7aa0ba874d9e6cfabb2e 100644
--- a/content/common/gpu/media/android_deferred_rendering_backing_strategy.cc
+++ b/content/common/gpu/media/android_deferred_rendering_backing_strategy.cc
@@ -30,15 +30,6 @@
namespace content {
-namespace {
-// clang-format off
-const float kIdentityMatrix[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};
-// clang-format on
-}
-
AndroidDeferredRenderingBackingStrategy::
AndroidDeferredRenderingBackingStrategy(AVDAStateProvider* state_provider)
: state_provider_(state_provider), media_codec_(nullptr) {}
@@ -296,7 +287,11 @@ void AndroidDeferredRenderingBackingStrategy::CopySurfaceTextureToPictures(
GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
}
- // TODO(liberato,watk): Use the SurfaceTexture matrix when copying.
+
+
+ float transform_matrix[16];
+ surface_texture_->GetTransformMatrix(transform_matrix);
+
gpu::CopyTextureCHROMIUMResourceManager copier;
copier.Initialize(
gl_decoder,
@@ -304,8 +299,8 @@ void AndroidDeferredRenderingBackingStrategy::CopySurfaceTextureToPictures(
copier.DoCopyTextureWithTransform(gl_decoder, GL_TEXTURE_EXTERNAL_OES,
shared_state_->surface_texture_service_id(),
GL_TEXTURE_2D, tmp_texture_id, size.width(),
- size.height(), false, false, false,
- kIdentityMatrix);
+ size.height(), true, false, false,
+ transform_matrix);
// Create an EGLImage from the 2D texture we just copied into. By associating
// the EGLImage with the PictureBuffer textures they will remain valid even
« no previous file with comments | « content/common/gpu/media/android_copying_backing_strategy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698