replace setConfig+allocPixels with single call
BUG=skia:
Review URL: https://codereview.chromium.org/162643002
git-svn-id: http://skia.googlecode.com/svn/trunk@13426 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/PathUtilsTest.cpp b/tests/PathUtilsTest.cpp
index 872af0b..4dfeda4 100644
--- a/tests/PathUtilsTest.cpp
+++ b/tests/PathUtilsTest.cpp
@@ -60,8 +60,7 @@
static void binary_to_skbitmap(const char* bin_bmp, SkBitmap* sk_bmp,
int w, int h, int rowBytes){
//init the SkBitmap
- sk_bmp->setConfig(SkBitmap::kARGB_8888_Config, w, h);
- sk_bmp->allocPixels();
+ sk_bmp->allocN32Pixels(w, h);
for (int y = 0; y < h; ++y) { // for every row
@@ -98,8 +97,7 @@
// make bmp
SkBitmap bmp;
- bmp.setConfig(SkBitmap::kARGB_8888_Config, w, h);
- bmp.allocPixels();
+ bmp.allocN32Pixels(w, h);
SkCanvas canvas(bmp);
canvas.clear(SK_ColorWHITE);
canvas.drawPath(*path, bmpPaint);