diff options
author | 2014-02-13 14:41:43 +0000 | |
---|---|---|
committer | 2014-02-13 14:41:43 +0000 | |
commit | deee496cd30070e52556dcb538c2e5eb39b66b81 (patch) | |
tree | 80f0326a191c966bc34057e4011bdb3233bc2a50 /tests/PathOpsExtendedTest.cpp | |
parent | b720ffd20829953c9595980422969520f5e33c76 (diff) |
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
Diffstat (limited to 'tests/PathOpsExtendedTest.cpp')
-rw-r--r-- | tests/PathOpsExtendedTest.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/PathOpsExtendedTest.cpp b/tests/PathOpsExtendedTest.cpp index 1083a897e1..cee27e4588 100644 --- a/tests/PathOpsExtendedTest.cpp +++ b/tests/PathOpsExtendedTest.cpp @@ -289,8 +289,7 @@ static void scaleMatrix(const SkPath& one, const SkPath& two, SkMatrix& scale) { 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 @@ bool drawAsciiPaths(const SkPath& one, const SkPath& two, bool drawPaths) { 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; |