mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 14:55:47 +00:00
Bug 1192192 - fix quad culling method. r=nical
--HG-- extra : histedit_source : 2a3cc12be6765576f55b659ca005814b960b6cf0
This commit is contained in:
parent
2b8b8c084b
commit
c976708e51
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user