RESOLVED FIXED 184343
WebCore::screenColorSpace is retrieving CGColorSpace from NSScreen directly
https://bugs.webkit.org/show_bug.cgi?id=184343
Summary WebCore::screenColorSpace is retrieving CGColorSpace from NSScreen directly
Brent Fulgham
Reported 2018-04-05 16:49:07 PDT
We should be brokering the screen's CGColorSpace from the UIProcess to the WebContent process.
Attachments
Patch (7.96 KB, patch)
2018-04-06 08:56 PDT, Brent Fulgham
no flags
Patch (7.93 KB, patch)
2018-04-06 09:22 PDT, Brent Fulgham
pvollan: review+
Radar WebKit Bug Importer
Comment 1 2018-04-05 16:49:38 PDT
Brent Fulgham
Comment 2 2018-04-06 08:56:10 PDT
Brent Fulgham
Comment 3 2018-04-06 09:22:23 PDT
Per Arne Vollan
Comment 4 2018-04-06 09:37:38 PDT
Comment on attachment 337369 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=337369&action=review > Source/WebCore/platform/ScreenProperties.h:51 > + enum EncodedDataType { > + Null, > + Name, > + Data, > + }; Perhaps we could indicate that this type is related to color space, for example: enum EncodedColorSpaceDataType { Null, ColorSpaceName, ColorSpaceData, };
Per Arne Vollan
Comment 5 2018-04-06 09:52:27 PDT
Comment on attachment 337369 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=337369&action=review Looks good! > Source/WebCore/platform/ScreenProperties.h:126 > + cgColorSpace = nullptr; This line is probably not strictly needed, since cgColorSpace should already be null. > Source/WebCore/platform/ScreenProperties.h:132 > + if (!colorSpaceName) > + return std::nullopt; It seems we should always have a color space name here, perhaps add an ASSERT? > Source/WebCore/platform/ScreenProperties.h:141 > + if (!iccData) > + return std::nullopt; Ditto.
Brent Fulgham
Comment 6 2018-04-06 12:25:21 PDT
Comment on attachment 337369 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=337369&action=review >> Source/WebCore/platform/ScreenProperties.h:51 >> + }; > > Perhaps we could indicate that this type is related to color space, for example: > > enum EncodedColorSpaceDataType { > Null, > ColorSpaceName, > ColorSpaceData, > }; Sure! >> Source/WebCore/platform/ScreenProperties.h:126 >> + cgColorSpace = nullptr; > > This line is probably not strictly needed, since cgColorSpace should already be null. OK. >> Source/WebCore/platform/ScreenProperties.h:132 >> + return std::nullopt; > > It seems we should always have a color space name here, perhaps add an ASSERT? OK. >> Source/WebCore/platform/ScreenProperties.h:141 >> + return std::nullopt; > > Ditto. Ditto! :-)
Brent Fulgham
Comment 7 2018-04-06 12:37:19 PDT
Note You need to log in before you can comment on or make changes to this bug.