зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1318156 - Add an option to minimize empty area in PaintedLayers. r=mstange
This commit is contained in:
Родитель
f23176620b
Коммит
d77b5a17ca
|
@ -538,6 +538,7 @@ private:
|
|||
|
||||
// This and code dependent on it should be removed once containerless scrolling looks stable.
|
||||
DECL_GFX_PREF(Once, "layout.scroll.root-frame-containers", LayoutUseContainersForRootFrames, bool, true);
|
||||
DECL_GFX_PREF(Live, "layout.smaller-painted-layers", LayoutSmallerPaintedLayers, bool, false);
|
||||
|
||||
DECL_GFX_PREF(Once, "media.hardware-video-decoding.force-enabled",
|
||||
HardwareVideoDecodingForceEnabled, bool, false);
|
||||
|
|
|
@ -2779,8 +2779,17 @@ PaintedLayerDataNode::FindPaintedLayerFor(const nsIntRect& aVisibleRect,
|
|||
data.mScaledMaybeHitRegionBounds.Intersects(aVisibleRect))) {
|
||||
break;
|
||||
}
|
||||
// If the visible region intersects with the current layer then we
|
||||
// can't possibly use any of the layers below it, so stop the search
|
||||
// now.
|
||||
//
|
||||
// If we're trying to minimize painted layer size and we don't
|
||||
// intersect the current visible region, then make sure we don't
|
||||
// use this painted layer.
|
||||
if (visibleRegion.Intersects(aVisibleRect)) {
|
||||
break;
|
||||
} else if (gfxPrefs::LayoutSmallerPaintedLayers()) {
|
||||
lowestUsableLayer = nullptr;
|
||||
}
|
||||
}
|
||||
if (lowestUsableLayer) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче