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

Unified Diff: gm/bleed.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/bitmapsource.cpp ('k') | gm/clippedbitmapshaders.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/bleed.cpp
diff --git a/gm/bleed.cpp b/gm/bleed.cpp
index 881760468ec2d415511e0affe8cc1aa5f60744be..c343d842366b3da02c0651fb28ff8befd0eec9d7 100644
--- a/gm/bleed.cpp
+++ b/gm/bleed.cpp
@@ -24,10 +24,7 @@ static void make_ringed_bitmap(SkBitmap* result, int width, int height) {
static const SkPMColor kBlack = SkPreMultiplyColor(SK_ColorBLACK);
static const SkPMColor kWhite = SkPreMultiplyColor(SK_ColorWHITE);
- result->setConfig(SkBitmap::kARGB_8888_Config, width, height, 0,
- kOpaque_SkAlphaType);
- result->allocPixels();
- SkAutoLockPixels lock(*result);
+ result->allocN32Pixels(width, height, true);
SkPMColor* scanline = result->getAddr32(0, 0);
for (int x = 0; x < width; ++x) {
« no previous file with comments | « gm/bitmapsource.cpp ('k') | gm/clippedbitmapshaders.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698