WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
221193
Avoid unnecessary chromatic adaptation when converting between colors with the same white point
https://bugs.webkit.org/show_bug.cgi?id=221193
Summary
Avoid unnecessary chromatic adaptation when converting between colors with th...
Sam Weinig
Reported
2021-01-31 17:20:00 PST
We currently always use the XYZ space with the D65 white point as our universal conversion space (the space we require each type to be able to convert to and from), but this is not ideal when converting between colors like ProPhotoRGB and Lab, which both use the D50 white point, since it requires an extra two matrix multiplications for the chromatic adaptations to and from D65. Additionally, to support color(xyz ...), which also use D50, we will need an explicit XYZ color with a D50 white point. We can solve both of these problems by further generalizing XYZA<T> to support a white point parameter, XYZA<T, WhitePoint>, and annotate all the colors with which whitepoint they are defined in (or what XYZA color is their reference). Then, we can use that information to lazily (though at compile time) determine whether chromatic adaptation is needed in the generic conversion functions.
Attachments
Patch
(32.98 KB, patch)
2021-01-31 17:29 PST
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Patch
(32.97 KB, patch)
2021-01-31 17:34 PST
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Sam Weinig
Comment 1
2021-01-31 17:29:49 PST
Comment hidden (obsolete)
Created
attachment 418835
[details]
Patch
Sam Weinig
Comment 2
2021-01-31 17:34:45 PST
Created
attachment 418836
[details]
Patch
EWS
Comment 3
2021-02-01 09:50:12 PST
Committed
r272146
: <
https://trac.webkit.org/changeset/272146
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 418836
[details]
.
Radar WebKit Bug Importer
Comment 4
2021-02-01 09:51:15 PST
<
rdar://problem/73833214
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug