Summary: | Add support for color(a98-rgb ...) as part of CSS Color 4 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Sam Weinig <sam> | ||||||||
Component: | CSS | Assignee: | Sam Weinig <sam> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | clopez, darin, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, macpherson, menard, simon.fraser, webkit-bug-importer, youennf | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Bug Depends on: | |||||||||||
Bug Blocks: | 220928 | ||||||||||
Attachments: |
|
Description
Sam Weinig
2021-01-26 16:10:57 PST
Created attachment 418486 [details]
Patch
Created attachment 418490 [details]
Patch
Looked over the patch and it sure does look good. Wonder how this slightly changed the P3 results? (In reply to Darin Adler from comment #3) > Looked over the patch and it sure does look good. Wonder how this slightly > changed the P3 results? I swapped the matrix values between the p3 and a98-rgb conversion matrices :(. Classic copy and paste-o for me. I'm adding a few more tests and will re-upload with the fix. Created attachment 418564 [details]
Patch
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess Comment on attachment 418564 [details] 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. Committed r271992: <https://trac.webkit.org/changeset/271992> All reviewed patches have been landed. Closing bug and clearing flags on attachment 418564 [details]. |