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

Unified Diff: samplecode/SampleHairModes.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/SampleFontCache.cpp ('k') | samplecode/SampleHairline.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleHairModes.cpp
diff --git a/samplecode/SampleHairModes.cpp b/samplecode/SampleHairModes.cpp
index 4168ffd6b42c6b4d027390848230a10c000cc6bb..4aa8e0208fea318fc9aa1e2ce4f3d07fee234a61 100644
--- a/samplecode/SampleHairModes.cpp
+++ b/samplecode/SampleHairModes.cpp
@@ -62,8 +62,7 @@ static SkScalar drawCell(SkCanvas* canvas, SkXfermode* mode, SkAlpha a0, SkAlpha
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 | « samplecode/SampleFontCache.cpp ('k') | samplecode/SampleHairline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698