Bug 1286412 - Use surface->GetSize() instead of aRect dimensions. draft
authorMiko Mynttinen <mikokm@gmail.com>
Mon, 03 Oct 2016 16:34:16 -0700
changeset 422288 31b0e9db364a9f31f813b9f10105132a561f5e71
parent 422256 49fe455cac957808ed4a5d1685c3a1938dac1d31
child 422289 d7f547b67718c4da7021af2519e3f41a925a2042
push id31731
push userbmo:mikokm@gmail.com
push dateFri, 07 Oct 2016 20:00:40 +0000
bugs1286412
milestone52.0a1
Bug 1286412 - Use surface->GetSize() instead of aRect dimensions. MozReview-Commit-ID: 2Fxcqh6TzjN
gfx/layers/opengl/CompositorOGL.cpp
--- a/gfx/layers/opengl/CompositorOGL.cpp
+++ b/gfx/layers/opengl/CompositorOGL.cpp
@@ -1360,17 +1360,18 @@ CompositorOGL::DrawQuad(const Rect& aRec
         BindMaskForProgram(program, sourceMask, LOCAL_GL_TEXTURE1, maskQuadTransform);
       }
       if (mixBlendBackdrop) {
         BindBackdrop(program, mixBlendBackdrop, LOCAL_GL_TEXTURE2);
       }
 
       if (config.mFeatures & ENABLE_TEXTURE_RECT) {
         // 2DRect case, get the multiplier right for a sampler2DRect
-        program->SetTexCoordMultiplier(aRect.width, aRect.height);
+        program->SetTexCoordMultiplier(surface->GetSize().width,
+                                       surface->GetSize().height);
       }
 
       // Drawing is always flipped, but when copying between surfaces we want to avoid
       // this. Pass true for the flip parameter to introduce a second flip
       // that cancels the other one out.
       didSetBlendMode = SetBlendMode(gl(), blendMode);
       BindAndDrawQuad(program, aRect);
     }