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

Unified Diff: tests/EmptyPathTest.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 | « no previous file | tests/FlatDataTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/EmptyPathTest.cpp
diff --git a/tests/EmptyPathTest.cpp b/tests/EmptyPathTest.cpp
index 09a1f5279c639fa6d363798ee9a1153540e851d3..c4f011a0dc65ae85b7c5421223d70ba8f2a909b6 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);
« no previous file with comments | « no previous file | tests/FlatDataTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698