Bug 1265625 - Call BindTexture to get correct transform for Android Surface Texture, r?jrmuizel draft
authorpeter chang <pchang@mozilla.com>
Tue, 10 May 2016 15:11:19 +0800
changeset 365187 afb87b3b29fe4210faab931490d1c1978d7d2498
parent 365186 3842edfbae37cb2f05de38120284451a2e81bada
child 520478 80a2714c455f4a07c2c23ffd51230f31b3567c38
push id17660
push userbmo:howareyou322@gmail.com
push dateTue, 10 May 2016 07:12:23 +0000
reviewersjrmuizel
bugs1265625
milestone48.0a1
Bug 1265625 - Call BindTexture to get correct transform for Android Surface Texture, r?jrmuizel 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);
       }