Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(725)

Unified Diff: tests/PathOpsSkpClipTest.cpp

Issue 162643002: replace setConfig+allocPixels with single call (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/PathOpsExtendedTest.cpp ('k') | tests/PathUtilsTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PathOpsSkpClipTest.cpp
diff --git a/tests/PathOpsSkpClipTest.cpp b/tests/PathOpsSkpClipTest.cpp
index e0f5e18f679b174a9bfd9008e64d0e591049dd88..d80224f1290b8fa9ea503abad0826dd625c5a584 100755
--- a/tests/PathOpsSkpClipTest.cpp
+++ b/tests/PathOpsSkpClipTest.cpp
@@ -403,10 +403,8 @@ void TestResult::testOne() {
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);
« no previous file with comments | « tests/PathOpsExtendedTest.cpp ('k') | tests/PathUtilsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698