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

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: Move code to clippedOverflow... 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
« no previous file with comments | « Source/core/rendering/svg/RenderSVGModelObject.h ('k') | Source/core/rendering/svg/RenderSVGRoot.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
+ // 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
« no previous file with comments | « Source/core/rendering/svg/RenderSVGModelObject.h ('k') | Source/core/rendering/svg/RenderSVGRoot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698