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

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: Fix logic. 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
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..d5eb523d142eb02f5f3120b64f90d1586c556c67 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,16 @@ bool CompositingLayerAssigner::updateSquashingAssignment(RenderLayer* layer, Squ
if (layer->parent())
layer->repainter().computeRepaintRectsIncludingDescendants();
+ // If |layer| was added to an already-existing squashing layer, issue repaints.
+ m_compositor->repaintOnCompositingChange(layer);
+
return true;
}
if (compositedLayerUpdate == RemoveFromSquashingLayer) {
if (layer->groupedMapping()) {
+ // Before removing |layer| from an already-existing squashing layer, issue repaints.
+
+ m_compositor->repaintOnCompositingChange(layer);
layer->groupedMapping()->setNeedsGraphicsLayerUpdate();
layer->setGroupedMapping(0);
}

Powered by Google App Engine
This is Rietveld 408576698