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:
Jeff Muizelaar 2022-07-14 15:25:13 +00:00
Родитель 1c21538aeb
Коммит d4b42e2000
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -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);