add legacy/helper allocN32Pixels, and convert gm to use it
This is an intermediate api, but might help us quickly get to a point where
no one is creating bitmaps in a 2-step process (setConfig + alloc).
BUG=skia:
R=halcanary@google.com
Review URL: https://codereview.chromium.org/140593005
git-svn-id: http://skia.googlecode.com/svn/trunk@13182 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gm/morphology.cpp b/gm/morphology.cpp
index 756190e..5cfb1c2 100644
--- a/gm/morphology.cpp
+++ b/gm/morphology.cpp
@@ -26,8 +26,7 @@
}
void make_bitmap() {
- fBitmap.setConfig(SkBitmap::kARGB_8888_Config, 135, 135);
- fBitmap.allocPixels();
+ fBitmap.allocN32Pixels(135, 135);
SkBitmapDevice device(fBitmap);
SkCanvas canvas(&device);
canvas.clear(0x0);