[Webkit-unassigned] [Bug 220146] New: Simplify adding new color spaces to WebCore
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Dec 25 20:48:25 PST 2020
https://bugs.webkit.org/show_bug.cgi?id=220146
Bug ID: 220146
Summary: Simplify adding new color spaces to WebCore
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Platform
Assignee: webkit-unassigned at lists.webkit.org
Reporter: sam at webkit.org
The spring refactoring of color made it quite a bit easier to add a new color space to WebCore without touching too many places, but it is still a bit more than necessary. Currently you need to:
- Add new value to ColorSpace enum in ColorSpace.h
- Add a new type to ColorTypes.h
- Add conversions to ColorConversion.h/cpp (it's quite unclear which ones you would need to add)
- Add serialization to ColorSerialization.h/cpp.
- Update switch statement in ColorSpace TextStream overload in Color.cpp
- Add override of Color constructor in Color.h
- Add override of Color::setColor in Color.h
- Update switch statement in ExtendedColor::callOnUnderlyingType in ExtendedColor.h
- Add new color space accessor to GraphicsContextCG.h/cpp.
- Update switch statement in cachedCGColorSpace in GraphicsContextCG.h
- Update switch statement in ColorCG.cpp
- Add css parsing support.
Many of these can be simplified, clarified or removed.
I think we can improve things such that the steps get reduced to:
- Add new value to ColorSpace enum in ColorSpace.h
- Update switch statement in ColorSpace TextStream overload (but lets move it to ColorSpace.cpp so it's clear you need to do this when adding the enum value).
- Add a new type to ColorTypes.h
- Add serialization to ColorSerialization.h/cpp.
- Add conversions to ColorConversion.h/cpp (but make it really clear which conversions are needed).
- Add new color space accessor to GraphicsContextCG.h/cpp.
- Update switch statement in cachedCGColorSpace in GraphicsContextCG.h
- Add css parsing support.
Not amazing, but will be an improvement.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20201226/e426ea6a/attachment.htm>
More information about the webkit-unassigned
mailing list