Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 94caace776745ba04ac48a565b3f43145a33cd06
https://github.com/WebKit/WebKit/commit/94caace776745ba04ac48a565b3f43145a33cd06
Author: Nikolas Zimmermann <[email protected]>
Date: 2026-08-02 (Sun, 02 Aug 2026)
Changed paths:
M Source/WebCore/rendering/RenderLayerSVGAdditions.cpp
M Source/WebCore/rendering/svg/RenderSVGContainer.cpp
Log Message:
-----------
[LBSE] Skip the outline paint pass for outline-free SVG renderers
https://bugs.webkit.org/show_bug.cgi?id=320813
Reviewed by Rob Buis.
Every SVG child was painted twice per frame: once for the foreground and
once for the outline phase, the latter constructing a PaintInfo and
calling paint() even when the renderer has no outline (the common case!).
The outline phase is a no-op without an outline, so the extra pass
was wasted work on every shape.
Guard the outline/self-outline pass behind hasOutline() in the three
places that drive it: paintChildrenInDOMOrderForSVG() and
paintRendererByApplyingTransformForSVG() for layer-painted children, and
RenderSVGContainer::paint() for the non-layer child walk.
Covered by existing tests.
* Source/WebCore/rendering/RenderLayerSVGAdditions.cpp:
(WebCore::RenderLayer::paintChildrenInDOMOrderForSVG):
(WebCore::RenderLayer::paintRendererByApplyingTransformForSVG):
* Source/WebCore/rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::paint):
Canonical link: https://commits.webkit.org/318410@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications