зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
1c21538aeb
Коммит
d4b42e2000
|
@ -2176,8 +2176,8 @@ void nsDisplayList::Paint(nsDisplayListBuilder* aBuilder, gfxContext* aCtx,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsRegion visible(item->GetClippedBounds(aBuilder));
|
nsRect visible = item->GetClippedBounds(aBuilder);
|
||||||
visible.And(visible, item->GetPaintRect(aBuilder, aCtx));
|
visible = visible.Intersect(item->GetPaintRect(aBuilder, aCtx));
|
||||||
if (visible.IsEmpty()) {
|
if (visible.IsEmpty()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -2185,7 +2185,7 @@ void nsDisplayList::Paint(nsDisplayListBuilder* aBuilder, gfxContext* aCtx,
|
||||||
DisplayItemClip currentClip = item->GetClip();
|
DisplayItemClip currentClip = item->GetClip();
|
||||||
if (currentClip.HasClip()) {
|
if (currentClip.HasClip()) {
|
||||||
aCtx->Save();
|
aCtx->Save();
|
||||||
if (currentClip.IsRectClippedByRoundedCorner(visible.GetBounds())) {
|
if (currentClip.IsRectClippedByRoundedCorner(visible)) {
|
||||||
currentClip.ApplyTo(aCtx, aAppUnitsPerDevPixel);
|
currentClip.ApplyTo(aCtx, aAppUnitsPerDevPixel);
|
||||||
} else {
|
} else {
|
||||||
currentClip.ApplyRectTo(aCtx, aAppUnitsPerDevPixel);
|
currentClip.ApplyRectTo(aCtx, aAppUnitsPerDevPixel);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче