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

Unified Diff: tests/PathUtilsTest.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/PathOpsSkpClipTest.cpp ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PathUtilsTest.cpp
diff --git a/tests/PathUtilsTest.cpp b/tests/PathUtilsTest.cpp
index 872af0b3632234e4ba48f6a38e996388b2b1086c..4dfeda467ce7a01b7e6d723cf67cac0b19bbff55 100644
--- a/tests/PathUtilsTest.cpp
+++ b/tests/PathUtilsTest.cpp
@@ -60,8 +60,7 @@ static void print_bmp( SkBitmap* bmp, int w, int h){
static void binary_to_skbitmap(const char* bin_bmp, SkBitmap* sk_bmp,
int w, int h, int rowBytes){
//init the SkBitmap
- sk_bmp->setConfig(SkBitmap::kARGB_8888_Config, w, h);
- sk_bmp->allocPixels();
+ sk_bmp->allocN32Pixels(w, h);
for (int y = 0; y < h; ++y) { // for every row
@@ -98,8 +97,7 @@ static void test_path_eq(skiatest::Reporter* reporter, const SkPath* path,
// make bmp
SkBitmap bmp;
- bmp.setConfig(SkBitmap::kARGB_8888_Config, w, h);
- bmp.allocPixels();
+ bmp.allocN32Pixels(w, h);
SkCanvas canvas(bmp);
canvas.clear(SK_ColorWHITE);
canvas.drawPath(*path, bmpPaint);
« no previous file with comments | « tests/PathOpsSkpClipTest.cpp ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698