Bug 1017427 - Fix CompositorOGL RenderOffset not offsetting clipping rect. r=nical, a=lmandel
authorChris Lord <chrislord.net@gmail.com>
Mon, 09 Jun 2014 16:53:35 +0100
changeset 207286 87ea377ded69fb3478db257a15376975bf91f6f9
parent 207285 9e6466bcc0e63ccdf6503a0a96256a3ef485cb84
child 207287 70d92047cc5dc0d740ecfbf89fbab127f804fb0f
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical, lmandel
bugs1017427
milestone32.0a2
Bug 1017427 - Fix CompositorOGL RenderOffset not offsetting clipping rect. r=nical, a=lmandel
gfx/layers/opengl/CompositorOGL.cpp
--- a/gfx/layers/opengl/CompositorOGL.cpp
+++ b/gfx/layers/opengl/CompositorOGL.cpp
@@ -1003,16 +1003,19 @@ CompositorOGL::DrawQuad(const Rect& aRec
 {
   PROFILER_LABEL("CompositorOGL", "DrawQuad",
     js::ProfileEntry::Category::GRAPHICS);
 
   MOZ_ASSERT(mFrameInProgress, "frame not started");
 
   IntRect intClipRect;
   aClipRect.ToIntRect(&intClipRect);
+  if (!mTarget) {
+    intClipRect.MoveBy(mRenderOffset.x, mRenderOffset.y);
+  }
 
   gl()->fScissor(intClipRect.x, FlipY(intClipRect.y + intClipRect.height),
                  intClipRect.width, intClipRect.height);
 
   LayerScope::SendEffectChain(mGLContext, aEffectChain,
                               aRect.width, aRect.height);
 
   MaskType maskType;