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

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

Issue 327093003: [RAL] Reduce SVG tree walks (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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/SVGRenderSupport.cpp
diff --git a/Source/core/rendering/svg/SVGRenderSupport.cpp b/Source/core/rendering/svg/SVGRenderSupport.cpp
index 722c7164e069689af4adc9f5fab26a3a1da5cd91..95a45f1ce22d205cdc781734f7c997c58ce20fa7 100644
--- a/Source/core/rendering/svg/SVGRenderSupport.cpp
+++ b/Source/core/rendering/svg/SVGRenderSupport.cpp
@@ -94,16 +94,22 @@ const RenderObject* SVGRenderSupport::pushMappingToContainer(const RenderObject*
return parent;
}
-bool SVGRenderSupport::checkForSVGRepaintDuringLayout(RenderObject* object)
+bool SVGRenderSupport::parentTransformDidChange(RenderObject* object)
{
- if (!object->checkForRepaintDuringLayout())
- return false;
// When a parent container is transformed in SVG, all children will be painted automatically
// so we are able to skip redundant repaint checks.
RenderObject* parent = object->parent();
return !(parent && parent->isSVGContainer() && toRenderSVGContainer(parent)->didTransformToRootUpdate());
}
+bool SVGRenderSupport::checkForSVGRepaintDuringLayout(RenderObject* object)
+{
+ if (!object->checkForRepaintDuringLayout())
+ return false;
+
+ return parentTransformDidChange(object);
+}
+
bool SVGRenderSupport::paintInfoIntersectsRepaintRect(const FloatRect& localRepaintRect, const AffineTransform& localTransform, const PaintInfo& paintInfo)
{
return localTransform.mapRect(localRepaintRect).intersects(paintInfo.rect);
« Source/core/rendering/svg/SVGRenderSupport.h ('K') | « Source/core/rendering/svg/SVGRenderSupport.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698