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

Unified Diff: gm/xfermodes3.cpp

Issue 140593005: add legacy/helper allocN32Pixels, and convert gm to use it (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 11 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 | « gm/xfermodes2.cpp ('k') | include/core/SkBitmap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/xfermodes3.cpp
diff --git a/gm/xfermodes3.cpp b/gm/xfermodes3.cpp
index d01c0190d4a4391f6f99a1a8052b493a47acdc57..bb7d6149c5e3c790a2720b65b4b13597c1832bd2 100644
--- a/gm/xfermodes3.cpp
+++ b/gm/xfermodes3.cpp
@@ -188,8 +188,7 @@ private:
SkPackARGB32(0xFF, 0x40, 0x40, 0x40)
};
SkBitmap bg;
- bg.setConfig(SkBitmap::kARGB_8888_Config, 2, 2, 0, kOpaque_SkAlphaType);
- bg.allocPixels();
+ bg.allocN32Pixels(2, 2, true);
SkAutoLockPixels bgAlp(bg);
memcpy(bg.getPixels(), kCheckData, sizeof(kCheckData));
@@ -212,8 +211,7 @@ private:
SkShader::kRepeat_TileMode))->unref();
SkBitmap bmp;
- bmp.setConfig(SkBitmap::kARGB_8888_Config, kSize, kSize);
- bmp.allocPixels();
+ bmp.allocN32Pixels(kSize, kSize);
SkCanvas bmpCanvas(bmp);
bmpCanvas.clear(SK_ColorTRANSPARENT);
« no previous file with comments | « gm/xfermodes2.cpp ('k') | include/core/SkBitmap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698