Bug 1207326 - Part 1: Correct projection clipping rectangle,r=matt.woodrow

- The clipping rectangle used in a call to Matrix4x4::TransformAndClipRect
  within CompositorOGL::DrawQuad is now using mRenderBound, with an
  offset applied consistent with use later in the function.
This commit is contained in:
Kearwood (Kip) Gilbert 2015-09-25 13:43:52 -07:00
parent 5ad8b759ce
commit 50dd2e430d

View File

@ -988,13 +988,17 @@ CompositorOGL::DrawQuad(const Rect& aRect,
return;
}
IntPoint offset = mCurrentRenderTarget->GetOrigin();
Rect renderBound = mRenderBound;
renderBound.IntersectRect(renderBound, aClipRect);
renderBound.MoveBy(offset);
Rect destRect = aTransform.TransformAndClipBounds(aRect, renderBound);
// XXX: This doesn't handle 3D transforms. It also doesn't handled rotated
// quads. Fix me.
Rect destRect = aTransform.TransformAndClipBounds(aRect, aClipRect);
mPixelsFilled += destRect.width * destRect.height;
IntPoint offset = mCurrentRenderTarget->GetOrigin();
// Do a simple culling if this rect is out of target buffer.
// Inflate a small size to avoid some numerical imprecision issue.
destRect.Inflate(1, 1);