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/PathOpsSkpClipTest.cpp b/tests/PathOpsSkpClipTest.cpp
index e0f5e18..d80224f 100755
--- a/tests/PathOpsSkpClipTest.cpp
+++ b/tests/PathOpsSkpClipTest.cpp
@@ -403,10 +403,8 @@
do {
int dimX = (width + scale - 1) / scale;
int dimY = (height + scale - 1) / scale;
- oldBitmap.setConfig(SkBitmap::kARGB_8888_Config, dimX, dimY);
- opBitmap.setConfig(SkBitmap::kARGB_8888_Config, dimX, dimY);
- bool success = oldBitmap.allocPixels() && opBitmap.allocPixels();
- if (success) {
+ if (oldBitmap.allocN32Pixels(dimX, dimY) &&
+ opBitmap.allocN32Pixels(dimX, dimY)) {
break;
}
SkDebugf("-%d-", scale);