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/PathOpsExtendedTest.cpp b/tests/PathOpsExtendedTest.cpp
index 1083a89..cee27e4 100644
--- a/tests/PathOpsExtendedTest.cpp
+++ b/tests/PathOpsExtendedTest.cpp
@@ -289,8 +289,7 @@
static int pathsDrawTheSame(SkBitmap& bits, const SkPath& scaledOne, const SkPath& scaledTwo,
int& error2x2) {
if (bits.width() == 0) {
- bits.setConfig(SkBitmap::kARGB_8888_Config, bitWidth * 2, bitHeight);
- bits.allocPixels();
+ bits.allocN32Pixels(bitWidth * 2, bitHeight);
}
SkCanvas canvas(bits);
canvas.drawColor(SK_ColorWHITE);
@@ -355,8 +354,7 @@
if (bitHeight >= (int) sizeof(out)) {
return false;
}
- bits.setConfig(SkBitmap::kARGB_8888_Config, bitWidth * 2, bitHeight);
- bits.allocPixels();
+ bits.allocN32Pixels(bitWidth * 2, bitHeight);
SkCanvas canvas(bits);
canvas.drawColor(SK_ColorWHITE);
SkPaint paint;