Summary: | Use the new template ColorSpaceCG helpers to cleanup some code | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Sam Weinig <sam> | ||||||||
Component: | New Bugs | Assignee: | Sam Weinig <sam> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | darin, heycam, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
Sam Weinig
2022-01-10 10:16:52 PST
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]. |