| Index: sky/engine/core/rendering/compositing/CompositingLayerAssigner.cpp
|
| diff --git a/sky/engine/core/rendering/compositing/CompositingLayerAssigner.cpp b/sky/engine/core/rendering/compositing/CompositingLayerAssigner.cpp
|
| index 0d24cab737f30d6f5567dfb14392d6765c24e785..5741a53408da4af214f92df6deef92fb50d56957 100644
|
| --- a/sky/engine/core/rendering/compositing/CompositingLayerAssigner.cpp
|
| +++ b/sky/engine/core/rendering/compositing/CompositingLayerAssigner.cpp
|
| @@ -32,10 +32,6 @@
|
|
|
| namespace blink {
|
|
|
| -// We will only allow squashing if the bbox-area:squashed-area doesn't exceed
|
| -// the ratio |gSquashingSparsityTolerance|:1.
|
| -static uint64_t gSquashingSparsityTolerance = 6;
|
| -
|
| CompositingLayerAssigner::CompositingLayerAssigner(RenderLayerCompositor* compositor)
|
| : m_compositor(compositor)
|
| , m_layerSquashingEnabled(compositor->layerSquashingEnabled())
|
| @@ -70,16 +66,6 @@ void CompositingLayerAssigner::SquashingState::updateSquashingStateForNewMapping
|
| haveAssignedBackingsToEntireSquashingLayerSubtree = false;
|
| }
|
|
|
| -bool CompositingLayerAssigner::squashingWouldExceedSparsityTolerance(const RenderLayer* candidate, const CompositingLayerAssigner::SquashingState& squashingState)
|
| -{
|
| - IntRect bounds = candidate->clippedAbsoluteBoundingBox();
|
| - IntRect newBoundingRect = squashingState.boundingRect;
|
| - newBoundingRect.unite(bounds);
|
| - const uint64_t newBoundingRectArea = newBoundingRect.size().area();
|
| - const uint64_t newSquashedArea = squashingState.totalAreaOfSquashedRects + bounds.size().area();
|
| - return newBoundingRectArea > gSquashingSparsityTolerance * newSquashedArea;
|
| -}
|
| -
|
| bool CompositingLayerAssigner::needsOwnBacking(const RenderLayer* layer) const
|
| {
|
| if (!m_compositor->canBeComposited(layer))
|
| @@ -120,9 +106,6 @@ CompositingReasons CompositingLayerAssigner::getReasonsPreventingSquashing(const
|
| if (!squashingState.haveAssignedBackingsToEntireSquashingLayerSubtree)
|
| return CompositingReasonSquashingWouldBreakPaintOrder;
|
|
|
| - if (squashingWouldExceedSparsityTolerance(layer, squashingState))
|
| - return CompositingReasonSquashingSparsityExceeded;
|
| -
|
| // FIXME: this is not efficient, since it walks up the tree . We should store these values on the CompositingInputsCache.
|
| ASSERT(squashingState.hasMostRecentMapping);
|
| const RenderLayer& squashingLayer = squashingState.mostRecentMapping->owningLayer();
|
|
|