[webkit-reviews] review granted: [Bug 221018] Add support for color(a98-rgb ...) as part of CSS Color 4 : [Attachment 418564] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 27 17:03:45 PST 2021


Darin Adler <darin at apple.com> has granted Sam Weinig <sam at webkit.org>'s request
for review:
Bug 221018: Add support for color(a98-rgb ...) as part of CSS Color 4
https://bugs.webkit.org/show_bug.cgi?id=221018

Attachment 418564: Patch

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




--- Comment #7 from Darin Adler <darin at apple.com> ---
Comment on attachment 418564
  --> https://bugs.webkit.org/attachment.cgi?id=418564
Patch

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

> Source/WebCore/platform/graphics/ColorConversion.h:204
> +	   return std::invoke(std::forward<Functor>(functor),
makeFromComponents<SRGBA<T>>(components));

Wondering how to refine further to make the per-encoding as small as possible.
Like, can the std::invoke be shared without hurting efficiency?

Really makes me wonder about the fundamental question: Practical way to map a
runtime enumeration to a template name.

> Source/WebCore/platform/graphics/ColorTypes.h:34
> +template<typename> struct SRGBA;

I’m a big fan of alphabetizing such things rather than putting them in logical
order. Would include AlphaTraits too.


More information about the webkit-reviews mailing list