Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c22c85fd52be074f029f80ab95d154c45802a991
      
https://github.com/WebKit/WebKit/commit/c22c85fd52be074f029f80ab95d154c45802a991
  Author: Dan Glastonbury <[email protected]>
  Date:   2026-08-21 (Fri, 21 Aug 2026)

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

  Log Message:
  -----------
  Remove redundant paint state save/restore around SVG gradient fill/stroke
https://bugs.webkit.org/show_bug.cgi?id=322250
rdar://185485580

Reviewed by Simon Fraser.

PathOrShapeGradientApplier bracketed each gradient apply in its own
context->save()/restore() pair, costing two IPC messages per gradient-filled 
shape
paint when rendering in the GPU process. The pair has been vestigial since
32921@main moved the CTM mutations it was originally added for into the 
gradient's
own space transform.

Remove it. All callers already bracket the apply/postApply sequence in an outer
GraphicsContextStateSaver, and LegacyRenderSVGResourceSolidColor has never 
restored
this state either, so gradient paint now behaves like solid-color paint.

Worth ~2.5% on MotionMark 1.3 Suits.

* Source/WebCore/rendering/svg/legacy/LegacyRenderSVGResourceGradient.cpp:
(WebCore::PathOrShapeGradientApplier::applyResource):
(WebCore::PathOrShapeGradientApplier::postApplyResource):

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



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

Reply via email to