RESOLVED FIXED235034
Use the new template ColorSpaceCG helpers to cleanup some code
https://bugs.webkit.org/show_bug.cgi?id=235034
Summary Use the new template ColorSpaceCG helpers to cleanup some code
Sam Weinig
Reported 2022-01-10 10:16:52 PST
Use the new template ColoreSpaceCG helpers to cleanup some code
Attachments
Patch (14.38 KB, patch)
2022-01-10 11:14 PST, Sam Weinig
no flags
Patch (14.38 KB, patch)
2022-01-10 11:34 PST, Sam Weinig
no flags
Patch (14.46 KB, patch)
2022-01-10 15:16 PST, Sam Weinig
no flags
Sam Weinig
Comment 1 2022-01-10 11:14:08 PST
Sam Weinig
Comment 2 2022-01-10 11:34:23 PST
Sam Weinig
Comment 3 2022-01-10 15:16:54 PST
Cameron McCormack (:heycam)
Comment 4 2022-01-10 18:18:22 PST
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)?
Sam Weinig
Comment 5 2022-01-11 10:39:33 PST
(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.
EWS
Comment 6 2022-01-11 10:44:41 PST
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].
Radar WebKit Bug Importer
Comment 7 2022-01-11 10:45:18 PST
Note You need to log in before you can comment on or make changes to this bug.