Skip to content

Commit

Permalink
Merge pull request airbnb#1071 from airbnb/btw/releaseFix
Browse files Browse the repository at this point in the history
Fix build for all platforms
  • Loading branch information
buba447 authored Nov 4, 2019
2 parents 44136b4 + 2a6840f commit f1eab8c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,8 @@ extension Color {
}

var cgColorValue: CGColor {
let colorspace : CGColorSpace
if #available(iOS 9.3, *) {
// Always use P3 colorspace for now
colorspace = CGColorSpace.init(name: CGColorSpace.displayP3) ?? CGColorSpaceCreateDeviceRGB()
} else {
colorspace = CGColorSpaceCreateDeviceRGB()
}
// TODO: Fix color spaces
let colorspace = CGColorSpaceCreateDeviceRGB()
return CGColor(colorSpace: colorspace, components: [CGFloat(r), CGFloat(g), CGFloat(b), CGFloat(a)]) ?? Color.clearColor
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -217,15 +217,8 @@ public final class CompatibleAnimationView: UIView {
var green: CGFloat = 0
var blue: CGFloat = 0
var alpha: CGFloat = 0

var colorspace : CGColorSpace

if #available(iOS 9.3, *) {
// Always use P3 colorspace for now
colorspace = CGColorSpace.init(name: CGColorSpace.displayP3) ?? CGColorSpaceCreateDeviceRGB()
} else {
colorspace = CGColorSpaceCreateDeviceRGB()
}
// TODO: Fix color spaces
let colorspace = CGColorSpaceCreateDeviceRGB()

let convertedColor = color.cgColor.converted(to: colorspace, intent: .defaultIntent, options: nil)

Expand Down

0 comments on commit f1eab8c

Please sign in to comment.