Use the new template ColoreSpaceCG helpers to cleanup some code
Created attachment 448778 [details] Patch
Created attachment 448781 [details] Patch
Created attachment 448805 [details] Patch
Comment on attachment 448805 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=448805&action=review > Source/WebCore/platform/graphics/cg/GradientRendererCG.cpp:511 > + using OutputSpaceColorType = std::conditional_t<HasCGColorSpaceMapping<ColorSpace::ExtendedSRGB>, ExtendedSRGBA<float>, SRGBA<float>>; Since this declaration to choose "ExtendedSRGB if supported else SRGB" is used in a bunch of places, maybe it should be in CGColorSpace.h? Maybe a templated using statement (so float is still specified explicitly)?
(In reply to Cameron McCormack (:heycam) from comment #4) > Comment on attachment 448805 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=448805&action=review > > > Source/WebCore/platform/graphics/cg/GradientRendererCG.cpp:511 > > + using OutputSpaceColorType = std::conditional_t<HasCGColorSpaceMapping<ColorSpace::ExtendedSRGB>, ExtendedSRGBA<float>, SRGBA<float>>; > > Since this declaration to choose "ExtendedSRGB if supported else SRGB" is > used in a bunch of places, maybe it should be in CGColorSpace.h? Maybe a > templated using statement (so float is still specified explicitly)? Sounds like a good idea.
Committed r287889 (245928@main): <https://commits.webkit.org/245928@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 448805 [details].
<rdar://problem/87408048>