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/gpu/GrSurface.cpp b/src/gpu/GrSurface.cpp
index 1fcc4ff..66ebe3b 100644
--- a/src/gpu/GrSurface.cpp
+++ b/src/gpu/GrSurface.cpp
@@ -23,8 +23,10 @@
 
 bool GrSurface::savePixels(const char* filename) {
     SkBitmap bm;
-    bm.setConfig(SkBitmap::kARGB_8888_Config, this->width(), this->height());
-    bm.allocPixels();
+    if (!bm.allocPixels(SkImageInfo::MakeN32Premul(this->width(),
+                                                   this->height()))) {
+        return false;
+    }
 
     bool result = readPixels(0, 0, this->width(), this->height(), kSkia8888_GrPixelConfig,
                              bm.getPixels());