mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 07:13:20 +00:00
Bug 1779580 - Use a nsRect instead of region for the visible area. r=mstange
The region could never be more complicated than a single rect anyways. Differential Revision: https://phabricator.services.mozilla.com/D151831
This commit is contained in:
parent
1c21538aeb
commit
d4b42e2000
@ -2176,8 +2176,8 @@ void nsDisplayList::Paint(nsDisplayListBuilder* aBuilder, gfxContext* aCtx,
|
||||
continue;
|
||||
}
|
||||
|
||||
nsRegion visible(item->GetClippedBounds(aBuilder));
|
||||
visible.And(visible, item->GetPaintRect(aBuilder, aCtx));
|
||||
nsRect visible = item->GetClippedBounds(aBuilder);
|
||||
visible = visible.Intersect(item->GetPaintRect(aBuilder, aCtx));
|
||||
if (visible.IsEmpty()) {
|
||||
continue;
|
||||
}
|
||||
@ -2185,7 +2185,7 @@ void nsDisplayList::Paint(nsDisplayListBuilder* aBuilder, gfxContext* aCtx,
|
||||
DisplayItemClip currentClip = item->GetClip();
|
||||
if (currentClip.HasClip()) {
|
||||
aCtx->Save();
|
||||
if (currentClip.IsRectClippedByRoundedCorner(visible.GetBounds())) {
|
||||
if (currentClip.IsRectClippedByRoundedCorner(visible)) {
|
||||
currentClip.ApplyTo(aCtx, aAppUnitsPerDevPixel);
|
||||
} else {
|
||||
currentClip.ApplyRectTo(aCtx, aAppUnitsPerDevPixel);
|
||||
|
Loading…
Reference in New Issue
Block a user