Bug 1192192 - fix quad culling method. r=nical

--HG--
extra : histedit_source : 2a3cc12be6765576f55b659ca005814b960b6cf0
This commit is contained in:
Jerry Shih 2015-08-13 08:22:58 -07:00
parent 2b8b8c084b
commit c976708e51

View File

@ -990,9 +990,12 @@ CompositorOGL::DrawQuad(const Rect& aRect,
Rect destRect = aTransform.TransformBounds(aRect);
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);
destRect.MoveBy(-offset);
if (!mRenderBound.Intersects(destRect)) {
return;
}
@ -1092,7 +1095,6 @@ CompositorOGL::DrawQuad(const Rect& aRect,
program->SetColorMatrix(effectColorMatrix->mColorMatrix);
}
IntPoint offset = mCurrentRenderTarget->GetOrigin();
program->SetRenderOffset(offset.x, offset.y);
LayerScope::SetRenderOffset(offset.x, offset.y);