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

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: removed bogus asserts Created 7 years 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/RenderLayerRepainter.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/RenderObject.cpp
diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp
index 10b57090264f2556569695ca5801ce7d253c12f3..ef70964c712e1d7fd01a56e9db84767adfde6634 100644
--- a/Source/core/rendering/RenderObject.cpp
+++ b/Source/core/rendering/RenderObject.cpp
@@ -1397,6 +1397,34 @@ void RenderObject::repaintUsingContainer(const RenderLayerModelObject* repaintCo
return;
}
+ if (repaintContainer->compositingState() == PaintsIntoGroupedBacking) {
+ 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);
+
+ // First, convert the repaint rect into the space of the repaintContainer
+ TransformState transformState(TransformState::ApplyTransformDirection, FloatQuad(FloatRect(r)));
+ mapLocalToContainer(repaintContainer, transformState, ApplyContainerFlip);
+ transformState.flatten();
+ offsetRect = transformState.lastPlanarQuad().enclosingBoundingBox();
+
+ // FIXME: the repaint rect computed below could be tighter in uncommon nested transform cases, if we passed the quad
+ // directly to the next chunk of code.
+
+ // Then, convert the repaint rect from repaintConainer space into the squashing GraphicsLayer's coordinates.
+ if (repaintContainer->hasTransform())
+ offsetRect = repaintContainer->layer()->transform()->mapRect(r);
+ offsetRect.move(-repaintContainer->layer()->offsetFromSquashingLayerOrigin());
+ repaintContainer->groupedMapping()->squashingLayer()->setNeedsDisplayInRect(offsetRect);
+ return;
+ }
+
if (repaintContainer->isRenderFlowThread()) {
toRenderFlowThread(repaintContainer)->repaintRectangleInRegions(r);
return;
« no previous file with comments | « Source/core/rendering/RenderLayerRepainter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698