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/bitmappremul.cpp b/gm/bitmappremul.cpp
index 8b4c2d6..57d22d7 100644
--- a/gm/bitmappremul.cpp
+++ b/gm/bitmappremul.cpp
@@ -23,8 +23,7 @@
static const int PIXEL_SIZE_4444 = SLIDE_SIZE / 16;
static void init_bitmap(SkBitmap::Config config, SkBitmap* bitmap) {
- bitmap->setConfig(config, SLIDE_SIZE, SLIDE_SIZE);
- bitmap->allocPixels();
+ bitmap->allocConfigPixels(config, SLIDE_SIZE, SLIDE_SIZE);
bitmap->eraseColor(SK_ColorWHITE);
}