mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Backout 4c89002460da (Bug 873378) for breaking the settings app on B2G
This commit is contained in:
parent
e6b60b3b6b
commit
0c95eabb49
@ -2041,9 +2041,6 @@ ContainerState::ProcessDisplayItems(const nsDisplayList& aList,
|
||||
topLeft = lastActiveScrolledRoot->GetOffsetToCrossDoc(mContainerReferenceFrame);
|
||||
}
|
||||
|
||||
int32_t maxLayers = nsDisplayItem::MaxActiveLayers();
|
||||
int layerCount = 0;
|
||||
|
||||
for (nsDisplayItem* item = aList.GetBottom(); item; item = item->GetAbove()) {
|
||||
NS_ASSERTION(mAppUnitsPerDevPixel == AppUnitsPerDevPixel(item),
|
||||
"items in a container layer should all have the same app units per dev pixel");
|
||||
@ -2086,10 +2083,6 @@ ContainerState::ProcessDisplayItems(const nsDisplayList& aList,
|
||||
}
|
||||
}
|
||||
|
||||
if (maxLayers != -1 && layerCount >= maxLayers) {
|
||||
forceInactive = true;
|
||||
}
|
||||
|
||||
// Assign the item to a layer
|
||||
if (layerState == LAYER_ACTIVE_FORCE ||
|
||||
(layerState == LAYER_INACTIVE && !mManager->IsWidgetLayerManager()) ||
|
||||
@ -2097,8 +2090,6 @@ ContainerState::ProcessDisplayItems(const nsDisplayList& aList,
|
||||
(layerState == LAYER_ACTIVE_EMPTY ||
|
||||
layerState == LAYER_ACTIVE))) {
|
||||
|
||||
layerCount++;
|
||||
|
||||
// LAYER_ACTIVE_EMPTY means the layer is created just for its metadata.
|
||||
// We should never see an empty layer with any visible content!
|
||||
NS_ASSERTION(layerState != LAYER_ACTIVE_EMPTY ||
|
||||
|
@ -1497,20 +1497,6 @@ nsDisplayItem::ForceActiveLayers()
|
||||
return sForce;
|
||||
}
|
||||
|
||||
/* static */ int32_t
|
||||
nsDisplayItem::MaxActiveLayers()
|
||||
{
|
||||
static int32_t sMaxLayers = false;
|
||||
static bool sMaxLayersCached = false;
|
||||
|
||||
if (!sMaxLayersCached) {
|
||||
Preferences::AddIntVarCache(&sMaxLayers, "layers.max-active", -1);
|
||||
sMaxLayersCached = true;
|
||||
}
|
||||
|
||||
return sMaxLayersCached;
|
||||
}
|
||||
|
||||
bool
|
||||
nsDisplayItem::RecomputeVisibility(nsDisplayListBuilder* aBuilder,
|
||||
nsRegion* aVisibleRegion) {
|
||||
|
@ -1003,12 +1003,6 @@ public:
|
||||
*/
|
||||
static bool ForceActiveLayers();
|
||||
|
||||
/**
|
||||
* Returns the maximum number of layers that should be created
|
||||
* or -1 for no limit. Requires setting the pref layers.max-acitve.
|
||||
*/
|
||||
static int32_t MaxActiveLayers();
|
||||
|
||||
/**
|
||||
* @return LAYER_NONE if BuildLayer will return null. In this case
|
||||
* there is no layer for the item, and Paint should be called instead
|
||||
|
@ -546,12 +546,6 @@ pref("layers.async-video.enabled", true);
|
||||
pref("layers.progressive-paint", true);
|
||||
pref("layers.low-precision-buffer", true);
|
||||
pref("layers.low-precision-resolution", 250);
|
||||
// We want to limit layers for two reasons:
|
||||
// 1) We can't scroll smoothly if we have to many draw calls
|
||||
// 2) Pages that have too many layers consume too much memory and crash.
|
||||
// By limiting the number of layers on mobile we're making the main thread
|
||||
// work harder keep scrolling smooth and memory low.
|
||||
pref("layers.max-active", 20);
|
||||
|
||||
pref("notification.feature.enabled", true);
|
||||
pref("dom.webnotifications.enabled", true);
|
||||
|
@ -4062,10 +4062,6 @@ pref("layers.acceleration.draw-fps", false);
|
||||
pref("layers.draw-borders", false);
|
||||
pref("layers.frame-counter", false);
|
||||
|
||||
// Max number of layers per container. See Overwrite in mobile prefs.
|
||||
pref("layers.max-active", -1);
|
||||
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
pref("layers.offmainthreadcomposition.enabled", true);
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user