author | Benoit Girard <b56girard@gmail.com> |
Fri, 27 Feb 2015 14:17:35 -0500 | |
changeset 259359 | d4985245dfd55ba44e0417c42c956e03d094b0df |
parent 259358 | b47b07514a11156dd40b2c22c002a98a53e4f036 |
child 259360 | 60383e5c8e4ef597f298e6e0c4e936775c381c3d |
push id | 29277 |
push user | ryanvm@gmail.com |
push date | Wed, 26 Aug 2015 18:32:23 +0000 |
treeherder | mozilla-central@fea87cbeaa6b [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | mattwoodrow |
bugs | 1136766 |
milestone | 43.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/gfx/layers/composite/LayerManagerComposite.cpp +++ b/gfx/layers/composite/LayerManagerComposite.cpp @@ -221,17 +221,21 @@ LayerManagerComposite::ApplyOcclusionCul } } // Subtract any areas that we know to be opaque from our // visible region. LayerComposite *composite = aLayer->AsLayerComposite(); if (!localOpaque.IsEmpty()) { nsIntRegion visible = composite->GetShadowVisibleRegion(); - visible.Sub(visible, localOpaque); + nsIntRegion afterCulling; + afterCulling.Sub(visible, localOpaque); + // Intersect the original region with the bounds of the culled region so + // that we don't increase the region's complexity. + visible.AndWith(afterCulling.GetBounds()); composite->SetShadowVisibleRegion(visible); } // Compute occlusions for our descendants (in front-to-back order) and allow them to // contribute to localOpaque. for (Layer* child = aLayer->GetLastChild(); child; child = child->GetPrevSibling()) { ApplyOcclusionCulling(child, localOpaque); }