Color interpolation has been updated to allow interpolation in the srgb-linear space and been clarified that mixing happens with alpha premultiplied colors.
Created attachment 445988 [details] Patch
Comment on attachment 445988 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=445988&action=review I didn't look at the test changes closely. > Source/WebCore/platform/graphics/ColorInterpolation.h:282 > + WebCore::ColorInterpolationColorSpace::SRGB, > + WebCore::ColorInterpolationColorSpace::XYZD50, Missing SRGBLinear. > Source/WebCore/platform/graphics/ColorNormalization.h:64 > +template<typename ComponentType> inline ComponentType normalizeHue(ComponentType hue) > +{ > + return std::fmod(std::fmod(hue, 360.0) + 360.0, 360.0); > +} Do we want to try to stick to floats and use fmodf when ComponentType is a float?
Created attachment 446034 [details] Patch
Created attachment 446038 [details] Patch
(In reply to Cameron McCormack (:heycam) from comment #2) > Comment on attachment 445988 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=445988&action=review > > I didn't look at the test changes closely. > > > Source/WebCore/platform/graphics/ColorInterpolation.h:282 > > + WebCore::ColorInterpolationColorSpace::SRGB, > > + WebCore::ColorInterpolationColorSpace::XYZD50, > > Missing SRGBLinear. Fixed. > > > Source/WebCore/platform/graphics/ColorNormalization.h:64 > > +template<typename ComponentType> inline ComponentType normalizeHue(ComponentType hue) > > +{ > > + return std::fmod(std::fmod(hue, 360.0) + 360.0, 360.0); > > +} > > Do we want to try to stick to floats and use fmodf when ComponentType is a > float? This would subtly change the output of mixing to not be consistent with parsing (which uses doubles in normalization currently). We probably need to think about the use of doubles in the parsing code and decide where the appropriate point to cast down to float is and apply that holistically. Thanks for the review.
Committed r286568 (?): <https://commits.webkit.org/r286568> All reviewed patches have been landed. Closing bug and clearing flags on attachment 446038 [details].
<rdar://problem/86122341>