add colorspace option to SkBitmap -> CGImageRef utility (patch from nico)



git-svn-id: http://skia.googlecode.com/svn/trunk@666 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/utils/mac/SkCGUtils.h b/include/utils/mac/SkCGUtils.h
index b1263f4..8a8a1ed 100644
--- a/include/utils/mac/SkCGUtils.h
+++ b/include/utils/mac/SkCGUtils.h
@@ -11,8 +11,25 @@
 
 class SkBitmap;
 
-CGImageRef SkCreateCGImageRef(const SkBitmap&);
+/**
+ *  Create an imageref from the specified bitmap using the specified colorspace.
+ */
+CGImageRef SkCreateCGImageRefWithColorspace(const SkBitmap& bm,
+                                            CGColorSpaceRef space);
 
+/**
+ *  Create an imageref from the specified bitmap using the colorspace
+ *  kCGColorSpaceGenericRGB
+ */
+CGImageRef SkCreateCGImageRef(const SkBitmap& bm) {
+    return SkCreateCGImageRefWithColorspace(bm, NULL);
+}
+
+/**
+ *  Draw the bitmap into the specified CG context. The bitmap will be converted
+ *  to a CGImage using the generic RGB colorspace. (x,y) specifies the position
+ *  of the top-left corner of the bitmap.
+ */
 void SkCGDrawBitmap(CGContextRef, const SkBitmap&, float x, float y);
 
 #endif