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

Unified Diff: Source/core/rendering/compositing/RenderLayerCompositor.cpp

Issue 195893026: Fix restrictions on squashing with incompatible scroll. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months 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: Source/core/rendering/compositing/RenderLayerCompositor.cpp
diff --git a/Source/core/rendering/compositing/RenderLayerCompositor.cpp b/Source/core/rendering/compositing/RenderLayerCompositor.cpp
index 4aa993786998fa87c6b571a548360a1107fd89a6..17df3b16852292df13781b34555ccba0dd112864 100644
--- a/Source/core/rendering/compositing/RenderLayerCompositor.cpp
+++ b/Source/core/rendering/compositing/RenderLayerCompositor.cpp
@@ -727,7 +727,14 @@ bool RenderLayerCompositor::updateLayerIfViewportConstrained(RenderLayer* layer)
bool RenderLayerCompositor::canSquashIntoCurrentSquashingOwner(const RenderLayer* layer, const RenderLayerCompositor::SquashingState& squashingState, const RenderLayer* clippingAncestor)
{
ASSERT(clippingAncestor);
- return clippingAncestor == squashingState.clippingAncestorForMostRecentMapping;
+ if (clippingAncestor != squashingState.clippingAncestorForMostRecentMapping)
+ return false;
+
+ ASSERT(squashignState.hasMostRecentMapping);
jbroman 2014/03/15 05:29:24 drive-by: squashingState not squashignState
chrishtr 2014/03/17 16:58:52 Done.
+ if (layer->scrollsWithRespectTo(&squashingState.mostRecentMapping->owningLayer()))
+ return false;
+
+ return true;
}
RenderLayerCompositor::CompositingStateTransitionType RenderLayerCompositor::computeCompositedLayerUpdate(RenderLayer* layer)
@@ -952,15 +959,6 @@ void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* ancestor
reasonsToComposite |= overlapCompositingReason;
- // If the layer is squashable, but would scroll differently than the
- // most recent backing that it would squash onto, then don't squash it.
- // Note that this happens before we know all possible compositing reasons
- // for this layer, but it's OK because we're just forcing the layer conservatively
- // to be separately composited rather than squashed, anyway.
- if (currentRecursionData.m_mostRecentCompositedLayer && requiresSquashing(reasonsToComposite)
- && layer->scrollsWithRespectTo(currentRecursionData.m_mostRecentCompositedLayer))
- reasonsToComposite |= CompositingReasonOverlapsWithoutSquashingTarget;
-
// The children of this layer don't need to composite, unless there is
// a compositing layer among them, so start by inheriting the compositing
// ancestor with m_subtreeIsCompositing set to false.
@@ -1184,7 +1182,7 @@ void RenderLayerCompositor::assignLayersToBackingsInternal(RenderLayer* layer, S
clippingAncestor = layer;
if (layerSquashingEnabled() && requiresSquashing(layer->compositingReasons()) && !canSquashIntoCurrentSquashingOwner(layer, squashingState, clippingAncestor))
- layer->setCompositingReasons(layer->compositingReasons() | CompositingReasonOverlapsWithoutSquashingTarget);
+ layer->setCompositingReasons(layer->compositingReasons() | CompositingReasonNoSquashingTargetFound);
CompositingStateTransitionType compositedLayerUpdate = computeCompositedLayerUpdate(layer);
« no previous file with comments | « LayoutTests/compositing/squashing/squash-above-fixed-2-expected.txt ('k') | Source/platform/graphics/CompositingReasons.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698