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

Unified Diff: samplecode/SampleAARectModes.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/SampleAAClip.cpp ('k') | samplecode/SampleAARects.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleAARectModes.cpp
diff --git a/samplecode/SampleAARectModes.cpp b/samplecode/SampleAARectModes.cpp
index 3a8eb13749824b6d8ae7c3e4ec05dd9b6427b7b7..bea0e28799bcb978a144caa5f178f0526d23258b 100644
--- a/samplecode/SampleAARectModes.cpp
+++ b/samplecode/SampleAARectModes.cpp
@@ -63,8 +63,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 | « samplecode/SampleAAClip.cpp ('k') | samplecode/SampleAARects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698