Skip to content

[overlay] Build CoreGraphics overlay in Swift 4 mode #19598

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 28, 2018

Conversation

moiseev
Copy link
Contributor

@moiseev moiseev commented Sep 27, 2018

Resolves: rdar://problem/35338851

@moiseev
Copy link
Contributor Author

moiseev commented Sep 27, 2018

@swift-ci Please test macOS platform

// known to Swift as CGColor(red:green:blue:alpha:). Unfortunately this API
// is not available on platforms other than macOS. It would be possible to
// replicate the exact functionality of that API using
// kGColorSpaceGenericRGB, but it is marked as unavailable for Swift. The
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should change the behavior on macOS, though; that should continue using the generic init(red:green:blue:alpha:).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(unless the CoreGraphics folks want it to be consistent across platforms)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, knowing nothing about color spaces etc., I asked them for a review. Calling the old one for macOS is a good idea, and I can even do that with if #available, thanks!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, #available won't do that, since it treats platforms you don't mention as "true". You'll still want #if.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😞

@moiseev
Copy link
Contributor Author

moiseev commented Sep 28, 2018

@swift-ci Please test macOS platform

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - bbdbb1675763f901e0c6358e275e0fb935bc980d

@moiseev
Copy link
Contributor Author

moiseev commented Sep 28, 2018

@swift-ci Please smoke test Linux platform

@moiseev moiseev merged commit 2ddc92a into swiftlang:master Sep 28, 2018
@moiseev moiseev deleted the core-graphics branch September 28, 2018 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants