Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2cce7d63e19ed7b700be013895e2c0c7b77748c3
      
https://github.com/WebKit/WebKit/commit/2cce7d63e19ed7b700be013895e2c0c7b77748c3
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-06-20 (Sat, 20 Jun 2026)

  Changed paths:
    M Source/WebCore/rendering/svg/legacy/LegacyRenderSVGResourceGradient.cpp

  Log Message:
  -----------
  [LegacySVG] Avoid an AffineTransform copy per paint in applyGradientResource()
https://bugs.webkit.org/show_bug.cgi?id=317515
rdar://180167764

Reviewed by Nikolas Zimmermann.

applyGradientResource() unconditionally copied gradientData.userspaceTransform
into a local before passing it to setFillGradient()/setStrokeGradient(), even
though the copy was only ever mutated in the stroke + non-scaling-stroke case.
Both setters take a const AffineTransform&, and transformOnNonScalingStroke()
returns by value, so the copy is unnecessary.

Pass gradientData.userspaceTransform directly in the fill and plain-stroke
paths, and forward the transformOnNonScalingStroke() result directly in the
non-scaling-stroke path. This removes a 6-double AffineTransform copy from
every gradient fill/stroke paint. No behavior change.

* Source/WebCore/rendering/svg/legacy/LegacyRenderSVGResourceGradient.cpp:
(WebCore::applyGradientResource):

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



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

Reply via email to