This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Convert colors to sRGB for mbgl; fix title case unit tests #11391
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mapbox/mapbox-gl-js#6285 tracks officially documenting the color space expected in the style JSON file format. |
The implementation looks good. Not sure why it doesn't round trip. |
frederoni
approved these changes
Mar 6, 2018
Still struggling with the tests on CircleCI, which apparently runs under Sierra rather than High Sierra:
|
21 commits later, the builds are green. 😓 I’m going to squash and merge this one. |
friedbunny
approved these changes
Mar 8, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😓
1ec5
commented
Mar 8, 2018
@@ -66,8 +66,17 @@ - (void)testTileSetFromTileURLTemplates { | |||
// when the tile set has attribution infos | |||
MGLAttributionInfo *mapboxInfo = [[MGLAttributionInfo alloc] initWithTitle:[[NSAttributedString alloc] initWithString:@"Mapbox"] | |||
URL:[NSURL URLWithString:@"https://www.mapbox.com/"]]; | |||
MGLColor *redColor = [MGLColor redColor]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is redundant to the following lines.
Assume mbgl needs colors in the sRGB color space rather than the calibrated RGB color space. Fixed link colors when creating attribution from HTML.
1ec5
force-pushed
the
1ec5-macos-srgb-11289
branch
from
March 8, 2018 00:53
a53f1a8
to
3e433b7
Compare
This was referenced Nov 16, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When converting an NSColor to
mbgl::Color
on macOS 10.13 High Sierra, automatically convert to the sRGB color space instead of the calibrated RGB color space. Colors set via the runtime styling API, as well as any colors displayed in the attribution buttons, should be more accurate now.This PR fixes the macOS SDK’s unit tests so that they pass on High Sierra. The calibrated RGB color space differs between Sierra and High Sierra. In addition, a compile-time conditional compilation check added in #10224 has been refined to work on macOS, and the macOS targets have been upgraded to Swift 4 (a pro forma procedure).
Fixes #11289.
/cc @frederoni @friedbunny @julianrex