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

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

Issue 714933002: Set relayoutChildren to 'true' only if size change happens in Table (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: wrong patch 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: Source/core/rendering/compositing/CompositingLayerAssigner.cpp
diff --git a/Source/core/rendering/compositing/CompositingLayerAssigner.cpp b/Source/core/rendering/compositing/CompositingLayerAssigner.cpp
index 44727edf222c79faa5fc90060f6f76b9bf2608f8..c8b50a681ee97faa656c33eba395880bf391a48a 100644
--- a/Source/core/rendering/compositing/CompositingLayerAssigner.cpp
+++ b/Source/core/rendering/compositing/CompositingLayerAssigner.cpp
@@ -58,7 +58,7 @@ void CompositingLayerAssigner::assign(RenderLayer* updateRoot, Vector<RenderLaye
squashingState.mostRecentMapping->finishAccumulatingSquashingLayers(squashingState.nextSquashedLayerIndex);
}
-void CompositingLayerAssigner::SquashingState::updateSquashingStateForNewMapping(CompositedLayerMapping* newCompositedLayerMapping, bool hasNewCompositedLayerMapping)
+void CompositingLayerAssigner::SquashingState::updateSquashingStateForNewMapping(CompositedLayerMapping* newCompositedLayerMapping)
{
// The most recent backing is done accumulating any more squashing layers.
if (hasMostRecentMapping)
@@ -67,7 +67,7 @@ void CompositingLayerAssigner::SquashingState::updateSquashingStateForNewMapping
nextSquashedLayerIndex = 0;
boundingRect = IntRect();
mostRecentMapping = newCompositedLayerMapping;
- hasMostRecentMapping = hasNewCompositedLayerMapping;
+ hasMostRecentMapping = newCompositedLayerMapping;
haveAssignedBackingsToEntireSquashingLayerSubtree = false;
}
@@ -95,12 +95,13 @@ bool CompositingLayerAssigner::needsOwnBacking(const RenderLayer* layer) const
CompositingStateTransitionType CompositingLayerAssigner::computeCompositedLayerUpdate(RenderLayer* layer)
{
CompositingStateTransitionType update = NoCompositingStateChange;
+ CompositedLayerMapping* compositedLayerMapping = layer->compositedLayerMapping();
if (needsOwnBacking(layer)) {
- if (!layer->hasCompositedLayerMapping()) {
+ if (!compositedLayerMapping) {
update = AllocateOwnCompositedLayerMapping;
}
} else {
- if (layer->hasCompositedLayerMapping())
+ if (compositedLayerMapping)
update = RemoveOwnCompositedLayerMapping;
if (m_layerSquashingEnabled) {
@@ -184,7 +185,7 @@ void CompositingLayerAssigner::updateSquashingAssignment(RenderLayer* layer, Squ
// when they have a composited negative z-index child, such layers will never need squashing so it is not yet an issue.
if (compositedLayerUpdate == PutInSquashingLayer) {
// A layer that is squashed with other layers cannot have its own CompositedLayerMapping.
- ASSERT(!layer->hasCompositedLayerMapping());
+ ASSERT(!layer->compositedLayerMapping());
ASSERT(squashingState.hasMostRecentMapping);
bool changedSquashingLayer =
@@ -231,8 +232,8 @@ void CompositingLayerAssigner::assignLayersToBackingsForReflectionLayer(RenderLa
m_compositor->updateDirectCompositingReasons(reflectionLayer);
// FIXME: Why do we updateGraphicsLayerConfiguration here instead of in the GraphicsLayerUpdater?
- if (reflectionLayer->hasCompositedLayerMapping())
- reflectionLayer->compositedLayerMapping()->updateGraphicsLayerConfiguration();
+ if (CompositedLayerMapping* compositedLayerMapping = reflectionLayer->compositedLayerMapping())
+ compositedLayerMapping->updateGraphicsLayerConfiguration();
}
void CompositingLayerAssigner::assignLayersToBackingsInternal(RenderLayer* layer, SquashingState& squashingState, Vector<RenderLayer*>& layersNeedingPaintInvalidation)
@@ -278,7 +279,7 @@ void CompositingLayerAssigner::assignLayersToBackingsInternal(RenderLayer* layer
// At this point, if the layer is to be separately composited, then its backing becomes the most recent in paint-order.
if (layer->compositingState() == PaintsIntoOwnBacking) {
ASSERT(!requiresSquashing(layer->compositingReasons()));
- squashingState.updateSquashingStateForNewMapping(layer->compositedLayerMapping(), layer->hasCompositedLayerMapping());
+ squashingState.updateSquashingStateForNewMapping(layer->compositedLayerMapping());
}
}

Powered by Google App Engine
This is Rietveld 408576698