Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f5492c8f3d5680fa6b458c496110962ed58c8ff7
https://github.com/WebKit/WebKit/commit/f5492c8f3d5680fa6b458c496110962ed58c8ff7
Author: Matt Woodrow <[email protected]>
Date: 2026-04-17 (Fri, 17 Apr 2026)
Changed paths:
M Source/WebCore/platform/graphics/Gradient.h
M Source/WebCore/platform/graphics/cg/GradientCG.cpp
M Source/WebCore/platform/graphics/cg/GradientRendererCG.cpp
M Source/WebCore/platform/graphics/cg/GradientRendererCG.h
Log Message:
-----------
REGRESSION(309060@main): Gradient rendering performance regressed by not
caching stop in device colorspace.
https://bugs.webkit.org/show_bug.cgi?id=312535
<rdar://174044547>
Reviewed by Dan Glastonbury.
This change switched back to rendering gradients in sRGB instead of device
colourspace.
I think we can do this again, as long as the 'device' (destination ImageBuffer)
colourspace isn't a linear one, and should be approximately equal to sRGB for
interpolation.
The regressing changeset added tests, so these should confirm this doesn't
reintroduce the bug.
* Source/WebCore/platform/graphics/Gradient.h:
* Source/WebCore/platform/graphics/cg/GradientCG.cpp:
(WebCore::nonLinearDestinationColorSpace):
(WebCore::Gradient::paint):
* Source/WebCore/platform/graphics/cg/GradientRendererCG.cpp:
(WTF::RetainPtr<CGGradientRef>>::createValueForKey):
(WebCore::GradientRendererCG::GradientRendererCG):
(WebCore::GradientRendererCG::makeGradient const):
(WebCore::GradientRendererCG::makeGradientBySampling const):
(WebCore::GradientRendererCG::createGradientBySampling):
* Source/WebCore/platform/graphics/cg/GradientRendererCG.h:
(WebCore::GradientRendererCG::GradientRendererCG):
(WebCore::GradientRendererCG::colorSpace const):
(WebCore::GradientRendererCG::createGradientBySampling):
Canonical link: https://commits.webkit.org/311433@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications