зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1574745 - Respect render target clip during DrawGeometry culling and overdraw pixel counting. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D43869 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
c3ccb5e5ca
Коммит
4bcd4b8795
|
@ -1290,11 +1290,15 @@ void CompositorOGL::DrawGeometry(const Geometry& aGeometry,
|
|||
|
||||
IntPoint offset = mCurrentRenderTarget->GetOrigin();
|
||||
IntSize size = mCurrentRenderTarget->GetSize();
|
||||
Rect renderBound(mCurrentRenderTarget->GetRect());
|
||||
|
||||
// Convert aClipRect into render target space.
|
||||
// Convert aClipRect into render target space, and intersect it with the
|
||||
// render target's clip.
|
||||
IntRect clipRect = aClipRect + mCurrentRenderTarget->GetClipSpaceOrigin();
|
||||
renderBound.IntersectRect(renderBound, Rect(clipRect));
|
||||
if (Maybe<IntRect> rtClip = mCurrentRenderTarget->GetClipRect()) {
|
||||
clipRect = clipRect.Intersect(*rtClip);
|
||||
}
|
||||
|
||||
Rect renderBound(mCurrentRenderTarget->GetRect().Intersect(clipRect));
|
||||
|
||||
Rect destRect = aTransform.TransformAndClipBounds(aRect, renderBound);
|
||||
|
||||
|
@ -1333,10 +1337,6 @@ void CompositorOGL::DrawGeometry(const Geometry& aGeometry,
|
|||
clipRect = clipRect.Intersect(RoundedOut(maskBounds));
|
||||
}
|
||||
|
||||
if (Maybe<IntRect> rtClip = mCurrentRenderTarget->GetClipRect()) {
|
||||
clipRect = clipRect.Intersect(*rtClip);
|
||||
}
|
||||
|
||||
// Move clipRect into device space.
|
||||
clipRect -= offset;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче