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/EmptyPathTest.cpp b/tests/EmptyPathTest.cpp
index 09a1f52..c4f011a 100644
--- a/tests/EmptyPathTest.cpp
+++ b/tests/EmptyPathTest.cpp
@@ -14,9 +14,8 @@
static void drawAndTest(skiatest::Reporter* reporter, const SkPath& path,
const SkPaint& paint, bool shouldDraw) {
SkBitmap bm;
- // explicitly specify a trim rowbytes, so we have no padding on each row
- bm.setConfig(SkBitmap::kARGB_8888_Config, DIMENSION, DIMENSION, DIMENSION*4);
- bm.allocPixels();
+ bm.allocN32Pixels(DIMENSION, DIMENSION);
+ SkASSERT(DIMENSION*4 == bm.rowBytes()); // ensure no padding on each row
bm.eraseColor(SK_ColorTRANSPARENT);
SkCanvas canvas(bm);