Bug 1265625 - Call BindTexture to get correct transform for Android Surface Texture. r=jrmuizel, a=ritu
authorpeter chang <pchang@mozilla.com>
Tue, 10 May 2016 15:11:19 +0800
changeset 333086 138121c338c75865135a001fc51f7465e36f4740
parent 333085 c79fc3fa7ea32107d3a3d73c6042f3e6b1804cdf
child 333087 8d9d3bd42788464b7f70180799a3e25f752d5a9a
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel, ritu
bugs1265625
milestone48.0a2
Bug 1265625 - Call BindTexture to get correct transform for Android Surface Texture. r=jrmuizel, a=ritu MozReview-Commit-ID: 1TW2hjyECAu
gfx/layers/opengl/CompositorOGL.cpp
--- a/gfx/layers/opengl/CompositorOGL.cpp
+++ b/gfx/layers/opengl/CompositorOGL.cpp
@@ -1235,21 +1235,22 @@ CompositorOGL::DrawQuad(const Rect& aRec
   case EffectTypes::RGB: {
       TexturedEffect* texturedEffect =
           static_cast<TexturedEffect*>(aEffectChain.mPrimaryEffect.get());
       TextureSource *source = texturedEffect->mTexture;
 
       didSetBlendMode = SetBlendMode(gl(), blendMode, texturedEffect->mPremultiplied);
 
       gfx::Filter filter = texturedEffect->mFilter;
-      Matrix4x4 textureTransform = source->AsSourceOGL()->GetTextureTransform();
 
       source->AsSourceOGL()->BindTexture(LOCAL_GL_TEXTURE0, filter);
 
       program->SetTextureUnit(0);
+
+      Matrix4x4 textureTransform = source->AsSourceOGL()->GetTextureTransform();
       program->SetTextureTransform(textureTransform);
 
       if (maskType != MaskType::MaskNone) {
         BindMaskForProgram(program, sourceMask, LOCAL_GL_TEXTURE1, maskQuadTransform);
       }
       if (mixBlendBackdrop) {
         BindBackdrop(program, mixBlendBackdrop, LOCAL_GL_TEXTURE2);
       }