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

Unified Diff: samplecode/SampleLayerMask.cpp

Issue 169063002: use SkColorType instead of SkBitmap::Config in samplecode (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 | « samplecode/SampleHairline.cpp ('k') | samplecode/SampleMipMap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleLayerMask.cpp
diff --git a/samplecode/SampleLayerMask.cpp b/samplecode/SampleLayerMask.cpp
index 33c06d1cb2c770d63753ad04b337e736c8e1c7d9..b3bbac622fd03fd22293d28b07fe45b5262ea211 100644
--- a/samplecode/SampleLayerMask.cpp
+++ b/samplecode/SampleLayerMask.cpp
@@ -36,8 +36,7 @@ protected:
SkBitmap mask;
int w = SkScalarRoundToInt(r.width());
int h = SkScalarRoundToInt(r.height());
- mask.setConfig(SkBitmap::kARGB_8888_Config, w, h);
- mask.allocPixels();
+ mask.allocN32Pixels(w, h);
mask.eraseColor(SK_ColorTRANSPARENT);
SkCanvas c(mask);
SkRect bounds = r;
« no previous file with comments | « samplecode/SampleHairline.cpp ('k') | samplecode/SampleMipMap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698