[webkit-reviews] review granted: [Bug 234492] Add support for premultiplied alpha interpolated gradients and defaulted off option to use them for CSS Gradients : [Attachment 447654] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 20 15:32:17 PST 2021


Simon Fraser (smfr) <simon.fraser at apple.com> has granted Sam Weinig
<sam at webkit.org>'s request for review:
Bug 234492: Add support for premultiplied alpha interpolated gradients and
defaulted off option to use them for CSS Gradients
https://bugs.webkit.org/show_bug.cgi?id=234492

Attachment 447654: Patch

https://bugs.webkit.org/attachment.cgi?id=447654&action=review




--- Comment #13 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
Comment on attachment 447654
  --> https://bugs.webkit.org/attachment.cgi?id=447654
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=447654&action=review

> Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml:287
> +CSSGradientAlphaPremultipliedInterpolationEnabled:

287CSSGradientAlphaPremultipliedInterpolationEnabled ->
287CSSGradientPremultipliedAlphaInterpolationEnabled ?

> Source/WebCore/platform/graphics/cg/GradientCGStrategy.h:82
> +    using Strategy = std::variant<Gradient, Shading>;

I don't like the naming here. To me, a "strategy" sounds like an enum value
describing which implementation to use. I was confused that pickStrategy(),
makeGradient() and makeShading() all return something called a "Strategy".

std::variant<Gradient, Shading> is more like "GradientRenderer" or something.


More information about the webkit-reviews mailing list