Index: skia/ext/skia_utils_mac.mm |
=================================================================== |
--- skia/ext/skia_utils_mac.mm (revision 88097) |
+++ skia/ext/skia_utils_mac.mm (working copy) |
@@ -186,6 +186,14 @@ |
SkColorGetA(color) / 255.0); |
} |
+// Converts ARGB to NSColor. |
+NSColor* SkColorToCalibratedNSColor(SkColor color) { |
+ return [NSColor colorWithCalibratedRed:SkColorGetR(color) / 255.0 |
+ green:SkColorGetG(color) / 255.0 |
+ blue:SkColorGetB(color) / 255.0 |
+ alpha:SkColorGetA(color) / 255.0]; |
+} |
+ |
SkBitmap CGImageToSkBitmap(CGImageRef image) { |
if (!image) |
return SkBitmap(); |