Bug 1274528 - Don't enforce layers.max-active when layerizing items with different AGRs. r=mstange

This reverts bug 1231818, as it caused problems with async scrolling on
pages with too many active layers.

MozReview-Commit-ID: 8eGjn4fzWFb
This commit is contained in:
Jamie Nicol 2016-05-27 16:29:19 +01:00
Родитель 15e582d11b
Коммит 31350135f5
1 изменённых файлов: 1 добавлений и 33 удалений

Просмотреть файл

@ -954,7 +954,6 @@ public:
const nsIntRect& aVisibleRect,
bool aForceOwnLayer,
bool aBackfaceidden,
bool aAvoidCreatingNewLayer,
NewPaintedLayerCallbackType aNewPaintedLayerCallback);
/**
@ -1007,12 +1006,6 @@ protected:
*/
PaintedLayerDataNode* EnsureNodeFor(AnimatedGeometryRoot* aAnimatedGeometryRoot);
/**
* Find the node for the nearest ancestor geometry root of
* aAnimatedGeometryRoot which already exists in the tree.
*/
PaintedLayerDataNode* FindNodeForNearestAncestor(AnimatedGeometryRoot* aAnimatedGeometryRoot);
/**
* Find an existing node in the tree for an ancestor of aAnimatedGeometryRoot.
* *aOutAncestorChild will be set to the last ancestor that was encountered
@ -2824,18 +2817,11 @@ PaintedLayerDataTree::FindPaintedLayerFor(AnimatedGeometryRoot* aAnimatedGeometr
const nsIntRect& aVisibleRect,
bool aForceOwnLayer,
bool aBackfaceHidden,
bool aAvoidCreatingNewLayer,
NewPaintedLayerCallbackType aNewPaintedLayerCallback)
{
const nsIntRect* bounds = aForceOwnLayer ? nullptr : &aVisibleRect;
FinishPotentiallyIntersectingNodes(aAnimatedGeometryRoot, bounds);
PaintedLayerDataNode* node = nullptr;
if (aAvoidCreatingNewLayer) {
node = FindNodeForNearestAncestor(aAnimatedGeometryRoot);
}
if (!node) {
node = EnsureNodeFor(aAnimatedGeometryRoot);
}
PaintedLayerDataNode* node = EnsureNodeFor(aAnimatedGeometryRoot);
if (aForceOwnLayer) {
node->SetAllDrawingAbove();
@ -2920,21 +2906,6 @@ PaintedLayerDataTree::EnsureNodeFor(AnimatedGeometryRoot* aAnimatedGeometryRoot)
return node;
}
PaintedLayerDataNode*
PaintedLayerDataTree::FindNodeForNearestAncestor(AnimatedGeometryRoot* aAnimatedGeometryRoot)
{
if (aAnimatedGeometryRoot) {
PaintedLayerDataNode* node = mNodes.Get(aAnimatedGeometryRoot);
if (node) {
return node;
}
return FindNodeForNearestAncestor(aAnimatedGeometryRoot->mParentAGR);
}
return nullptr;
}
bool
PaintedLayerDataTree::IsClippedWithRespectToParentAnimatedGeometryRoot(AnimatedGeometryRoot* aAnimatedGeometryRoot,
nsIntRect* aOutClip)
@ -4216,14 +4187,11 @@ ContainerState::ProcessDisplayItems(nsDisplayList* aList)
*/
mLayerBuilder->AddLayerDisplayItem(ownLayer, item, layerState, nullptr);
} else {
bool avoidCreatingLayer = (maxLayers != -1 && layerCount >= maxLayers);
PaintedLayerData* paintedLayerData =
mPaintedLayerDataTree.FindPaintedLayerFor(animatedGeometryRoot, agrScrollClip,
itemVisibleRect, false,
item->Frame()->In3DContextAndBackfaceIsHidden(),
avoidCreatingLayer,
[&]() {
layerCount++;
return NewPaintedLayerData(item, animatedGeometryRoot, agrScrollClip,
topLeft, clipMovesWithLayer);
});