add installPixels

BUG=skia:
R=halcanary@google.com

Review URL: https://codereview.chromium.org/143073008

git-svn-id: http://skia.googlecode.com/svn/trunk@13174 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/utils/mac/SkCreateCGImageRef.cpp b/src/utils/mac/SkCreateCGImageRef.cpp
index 0677b7b..1b52ba3 100644
--- a/src/utils/mac/SkCreateCGImageRef.cpp
+++ b/src/utils/mac/SkCreateCGImageRef.cpp
@@ -209,8 +209,9 @@
     int h = (int)CGRectGetHeight(bounds);
 
     SkBitmap bitmap;
-    bitmap.setConfig(SkBitmap::kARGB_8888_Config, w, h);
-    bitmap.allocPixels();
+    if (!bitmap.allocPixels(SkImageInfo::MakeN32Premul(w, h))) {
+        return false;
+    }
     bitmap.eraseColor(SK_ColorWHITE);
 
     size_t bitsPerComponent;