Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: sky/engine/core/rendering/compositing/CompositingLayerAssigner.cpp

Issue 709623002: Remove sparsity tolerance check when considering squashing layers (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
« no previous file with comments | « sky/engine/core/rendering/compositing/CompositingLayerAssigner.h ('k') | sky/engine/platform/graphics/CompositingReasons.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698