mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 02:31:59 +00:00
Bug 516740. Never simplify the visible region by increasing its area when we're subtracting opaque areas from the visible region. Instead, just don't subtract the opaque area if it would make the visible region too complex. r=bzbarsky
--HG-- extra : rebase_source : 388dd9229d6d1a50efd409f508aded95f1ec226a
This commit is contained in:
parent
eaeee3bd5a
commit
110dce9d34
@ -170,9 +170,12 @@ void
|
||||
nsDisplayListBuilder::SubtractFromVisibleRegion(nsRegion* aVisibleRegion,
|
||||
const nsRegion& aRegion)
|
||||
{
|
||||
aVisibleRegion->Sub(*aVisibleRegion, aRegion);
|
||||
if (!GetAccurateVisibleRegions()) {
|
||||
aVisibleRegion->SimplifyOutward(15);
|
||||
nsRegion tmp;
|
||||
tmp.Sub(*aVisibleRegion, aRegion);
|
||||
// Don't let *aVisibleRegion get too complex, but don't let it fluff out
|
||||
// to its bounds either, which can be very bad (see bug 516740).
|
||||
if (GetAccurateVisibleRegions() || tmp.GetNumRects() <= 15) {
|
||||
*aVisibleRegion = tmp;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user