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

Unified Diff: gm/aarectmodes.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/aaclip.cpp ('k') | gm/arithmode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/aarectmodes.cpp
diff --git a/gm/aarectmodes.cpp b/gm/aarectmodes.cpp
index 704ddcbb6d355e6e569572fda814f1dac41d2a1f..a614761e69bfcf68cde965f2440ae39ed2d271b9 100644
--- a/gm/aarectmodes.cpp
+++ b/gm/aarectmodes.cpp
@@ -108,8 +108,7 @@ static SkScalar drawCell(SkCanvas* canvas, SkXfermode* mode,
static SkShader* make_bg_shader() {
SkBitmap bm;
- bm.setConfig(SkBitmap::kARGB_8888_Config, 2, 2);
- bm.allocPixels();
+ bm.allocN32Pixels(2, 2);
*bm.getAddr32(0, 0) = *bm.getAddr32(1, 1) = 0xFFFFFFFF;
*bm.getAddr32(1, 0) = *bm.getAddr32(0, 1) = SkPackARGB32(0xFF, 0xCC,
0xCC, 0xCC);
« no previous file with comments | « gm/aaclip.cpp ('k') | gm/arithmode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698