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

Unified Diff: Source/core/rendering/svg/RenderSVGModelObject.cpp

Issue 598623002: Initial PaintInvalidationState support for SVG (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. Created 6 years, 3 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/svg/RenderSVGModelObject.cpp
diff --git a/Source/core/rendering/svg/RenderSVGModelObject.cpp b/Source/core/rendering/svg/RenderSVGModelObject.cpp
index daeb2eedbac4cead26264887a974a5195655608a..0269301855984e9f2ca1d5addb06d74b79f23eb4 100644
--- a/Source/core/rendering/svg/RenderSVGModelObject.cpp
+++ b/Source/core/rendering/svg/RenderSVGModelObject.cpp
@@ -125,11 +125,20 @@ void RenderSVGModelObject::absoluteFocusRingQuads(Vector<FloatQuad>& quads)
quads.append(localToAbsoluteQuad(FloatQuad(paintInvalidationRectInLocalCoordinates())));
}
-InvalidationReason RenderSVGModelObject::invalidatePaintIfNeeded(const PaintInvalidationState& paintInvalidationState, const RenderLayerModelObject& paintInvalidationContainer)
+void RenderSVGModelObject::invalidateTreeIfNeeded(const PaintInvalidationState& paintInvalidationState)
{
- ForceHorriblySlowRectMapping slowRectMapping(&paintInvalidationState);
+ ASSERT(!needsLayout());
- return RenderObject::invalidatePaintIfNeeded(paintInvalidationState, paintInvalidationContainer);
+ // If we didn't need paint invalidation then our children don't need as well.
pdr. 2014/09/25 05:38:59 Nit: In my experience, children are extremely need
fs 2014/09/25 12:17:53 My diplomatic response to this would be: "No comme
fs 2014/09/25 12:30:26 s/this statement/the statement the comment makes/
dsinclair 2014/09/25 13:14:11 As part of repaint-after-layout, we made this an i
+ // Skip walking down the tree as everything should be fine below us.
+ if (!shouldCheckForPaintInvalidation(paintInvalidationState))
+ return;
+
+ invalidatePaintIfNeeded(paintInvalidationState, paintInvalidationState.paintInvalidationContainer());
+ clearPaintInvalidationState(paintInvalidationState);
+
+ PaintInvalidationState childPaintInvalidationState(paintInvalidationState, *this);
+ invalidatePaintOfSubtreesIfNeeded(childPaintInvalidationState);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698