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

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

Issue 309093002: Issue repaints before and after changing the squashing assignment of a RenderLayer. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Merged. Created 6 years, 7 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
« no previous file with comments | « Source/core/rendering/compositing/CompositedLayerMapping.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/compositing/CompositingLayerAssigner.cpp
diff --git a/Source/core/rendering/compositing/CompositingLayerAssigner.cpp b/Source/core/rendering/compositing/CompositingLayerAssigner.cpp
index db954065ea48e58c8e48086819033a68cfb54283..22e2c90fdc6a7db14f8b796df09bd15c0e516cf9 100644
--- a/Source/core/rendering/compositing/CompositingLayerAssigner.cpp
+++ b/Source/core/rendering/compositing/CompositingLayerAssigner.cpp
@@ -183,9 +183,6 @@ bool CompositingLayerAssigner::updateSquashingAssignment(RenderLayer* layer, Squ
layer->clipper().clearClipRectsIncludingDescendants();
- // If we need to repaint, do so before allocating the layer to the squashing layer.
- m_compositor->repaintOnCompositingChange(layer);
-
// FIXME: it seems premature to compute this before all compositing state has been updated?
// This layer and all of its descendants have cached repaints rects that are relative to
// the repaint container, so change when compositing changes; we need to update them here.
@@ -194,10 +191,15 @@ bool CompositingLayerAssigner::updateSquashingAssignment(RenderLayer* layer, Squ
if (layer->parent())
layer->repainter().computeRepaintRectsIncludingDescendants();
+ // Issue a repaint, since |layer| may have been added to an already-existing squashing layer.
+ m_compositor->repaintOnCompositingChange(layer);
+
return true;
}
if (compositedLayerUpdate == RemoveFromSquashingLayer) {
if (layer->groupedMapping()) {
+ // Before removing |layer| from an already-existing squashing layer that may have other content, issue a repaint.
+ m_compositor->repaintOnCompositingChange(layer);
layer->groupedMapping()->setNeedsGraphicsLayerUpdate();
layer->setGroupedMapping(0);
}
@@ -206,7 +208,7 @@ bool CompositingLayerAssigner::updateSquashingAssignment(RenderLayer* layer, Squ
// the repaint container, so change when compositing changes; we need to update them here.
layer->repainter().computeRepaintRectsIncludingDescendants();
- // If we need to repaint, do so now that we've removed it from a squashed layer
+ // If we need to repaint, do so now that we've removed it from a squashed layer.
m_compositor->repaintOnCompositingChange(layer);
layer->setLostGroupedMapping(false);
« no previous file with comments | « Source/core/rendering/compositing/CompositedLayerMapping.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698