replace setConfig+allocPixels with alloc-or-install-pixels

BUG=skia:
R=scroggo@google.com, halcanary@google.com, reed@google.com

Author: reed@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13442 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/BlurTest.cpp b/tests/BlurTest.cpp
index 386581c..1e9f314 100644
--- a/tests/BlurTest.cpp
+++ b/tests/BlurTest.cpp
@@ -27,9 +27,8 @@
 static const SkColor bgColor = SK_ColorWHITE;
 static const int strokeWidth = 4;
 
-static void create(SkBitmap* bm, SkIRect bound, SkBitmap::Config config) {
-    bm->setConfig(config, bound.width(), bound.height());
-    bm->allocPixels();
+static void create(SkBitmap* bm, const SkIRect& bound) {
+    bm->allocN32Pixels(bound.width(), bound.height());
 }
 
 static void drawBG(SkCanvas* canvas) {
@@ -126,7 +125,7 @@
                 refBound.roundOut(&iref);
                 iref.inset(-outset, -outset);
                 SkBitmap refBitmap;
-                create(&refBitmap, iref, SkBitmap::kARGB_8888_Config);
+                create(&refBitmap, iref);
 
                 SkCanvas refCanvas(refBitmap);
                 refCanvas.translate(SkIntToScalar(-iref.fLeft),
@@ -137,7 +136,7 @@
                 for (int view = 0; view < tests[test].viewLen; ++view) {
                     SkIRect itest = tests[test].views[view];
                     SkBitmap testBitmap;
-                    create(&testBitmap, itest, SkBitmap::kARGB_8888_Config);
+                    create(&testBitmap, itest);
 
                     SkCanvas testCanvas(testBitmap);
                     testCanvas.translate(SkIntToScalar(-itest.fLeft),
@@ -244,8 +243,7 @@
 // Readback the blurred draw results from the canvas
 static void readback(SkCanvas* canvas, int* result, int resultCount) {
     SkBitmap readback;
-    readback.setConfig(SkBitmap::kARGB_8888_Config, resultCount, 30);
-    readback.allocPixels();
+    readback.allocN32Pixels(resultCount, 30);
 
     SkIRect readBackRect = { 0, 0, resultCount, 30 };
 
@@ -265,8 +263,7 @@
                           int* result, int resultCount) {
 
     SkBitmap bitmap;
-    bitmap.setConfig(SkBitmap::kARGB_8888_Config, resultCount, 30);
-    bitmap.allocPixels();
+    bitmap.allocN32Pixels(resultCount, 30);
     SkCanvas canvas(bitmap);
 
     blur_path(&canvas, path, gaussianSigma);