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

Unified Diff: Source/core/rendering/RenderObject.cpp

Issue 88863002: Land layer squashing behind a flag (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: not perfect but can be reviewed Created 7 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/RenderObject.cpp
diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp
index 27896d5978ef96f3e9518c672c7e79dda38c75e2..44f3d571f08b6b52529df12aa52d20d52b4cc953 100644
--- a/Source/core/rendering/RenderObject.cpp
+++ b/Source/core/rendering/RenderObject.cpp
@@ -1397,6 +1397,22 @@ void RenderObject::repaintUsingContainer(const RenderLayerModelObject* repaintCo
return;
}
+ if (repaintContainer->compositingState() == PaintsIntoGroupedBacking) {
+ // FIXME: this if-statement may not catch the repaint invalidation that comes from a descendant that contributes to this squashed subtree.
+
+ ASSERT(repaintContainer->groupedMapping());
+
+ // Not clean, but if squashing layer does not yet exist here (e.g. repaint invalidation coming from within recomputing compositing requirements)
+ // then it's ok to just exit here, since the squashing layer will get repainted when it is newly created.
+ if (!repaintContainer->groupedMapping()->squashingLayer())
+ return;
+
+ IntRect offsetRect(r);
+ offsetRect.move(-repaintContainer->layer()->offsetFromSquashingLayerOrigin());
+ repaintContainer->groupedMapping()->squashingLayer()->setNeedsDisplayInRect(offsetRect);
+ return;
+ }
+
if (repaintContainer->isRenderFlowThread()) {
toRenderFlowThread(repaintContainer)->repaintRectangleInRegions(r);
return;

Powered by Google App Engine
This is Rietveld 408576698