Title: [295722] trunk/Source/WebCore/rendering/svg/SVGResourcesCache.cpp
Revision
295722
Author
[email protected]
Date
2022-06-21 22:58:16 -0700 (Tue, 21 Jun 2022)

Log Message

Eliminate one repaint from SVGResourcesCache::clientLayoutChanged
https://bugs.webkit.org/show_bug.cgi?id=241822

Reviewed by Simon Fraser.

SVGResourcesCache::clientLayoutChanged is called under all of the SVG
render object layout functions, to invalidate the SVG resource and
repaint the element. But all of the layout functions will already
repaint the element due to their LayoutRepainter on the stack.

This repaint can be expensive due to the rectangle calculations. We can
skip it by passing false into clientLayoutChanged.

This is an improvement of 3% on the MotionMark Suits sub-test on some
devices.

* Source/WebCore/rendering/svg/SVGResourcesCache.cpp:
(WebCore::SVGResourcesCache::clientLayoutChanged):

Canonical link: https://commits.webkit.org/251727@main

Modified Paths

Diff

Modified: trunk/Source/WebCore/rendering/svg/SVGResourcesCache.cpp (295721 => 295722)


--- trunk/Source/WebCore/rendering/svg/SVGResourcesCache.cpp	2022-06-22 04:11:35 UTC (rev 295721)
+++ trunk/Source/WebCore/rendering/svg/SVGResourcesCache.cpp	2022-06-22 05:58:16 UTC (rev 295722)
@@ -88,7 +88,7 @@
     // Invalidate the resources if either the RenderElement itself changed,
     // or we have filter resources, which could depend on the layout of children.
     if (renderer.selfNeedsLayout())
-        resources->removeClientFromCache(renderer);
+        resources->removeClientFromCache(renderer, false);
 }
 
 static inline bool rendererCanHaveResources(RenderObject& renderer)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to