Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8b35ecea6411bb80f91177f032958dcd174302ff
      
https://github.com/WebKit/WebKit/commit/8b35ecea6411bb80f91177f032958dcd174302ff
  Author: Nikolas Zimmermann <[email protected]>
  Date:   2026-07-06 (Mon, 06 Jul 2026)

  Changed paths:
    M Source/WebCore/rendering/RenderLayerModelObject.cpp
    M Source/WebCore/svg/SVGGraphicsElement.cpp
    M Source/WebCore/svg/SVGGraphicsElement.h

  Log Message:
  -----------
  [LBSE] Cache the concatenated SVG transform attribute matrix
https://bugs.webkit.org/show_bug.cgi?id=318661

Reviewed by Rob Buis.

SVGTransformList::concatenate() walks the transform list and multiplies every
item on each read ~ 3 times per animation frame: updateHasSVGTransformFlags ->
hasTransformRelatedAttributes, updateLocalTransform via applySVGTransform,
and computeRendererTransformForSVG. The result only changes when the transform
list mutates, which always routes through 
SVGGraphicsElement::svgAttributeChanged.

Cache it on SVGGraphicsElement and flush it in svgAttributeChanged, to fix that.
Covered by existing tests.

* Source/WebCore/rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::applySVGTransform const):
* Source/WebCore/svg/SVGGraphicsElement.cpp:
(WebCore::SVGGraphicsElement::animatedLocalTransform const):
(WebCore::SVGGraphicsElement::svgAttributeChanged):
* Source/WebCore/svg/SVGGraphicsElement.h:
(WebCore::SVGGraphicsElement::concatenatedTransform const):
(WebCore::SVGGraphicsElement::invalidateConcatenatedTransformCache const):
(WebCore::SVGGraphicsElement::hasTransformRelatedAttributes const):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to