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

Unified Diff: samplecode/SampleTinyBitmap.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/SampleTiling.cpp ('k') | samplecode/SampleUnpremul.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleTinyBitmap.cpp
diff --git a/samplecode/SampleTinyBitmap.cpp b/samplecode/SampleTinyBitmap.cpp
index 72664c7fc81f1d86848d18b3e2f81ddcac56a47a..57ce2ff319ce9770de3b9775d95e954138af21d2 100644
--- a/samplecode/SampleTinyBitmap.cpp
+++ b/samplecode/SampleTinyBitmap.cpp
@@ -22,8 +22,9 @@ static SkBitmap make_bitmap() {
SkColorTable* ctable = new SkColorTable(c, N);
SkBitmap bm;
- bm.setConfig(SkBitmap::kIndex8_Config, 1, 1);
- bm.allocPixels(ctable);
+ bm.allocPixels(SkImageInfo::Make(1, 1, kIndex_8_SkColorType,
+ kPremul_SkAlphaType),
+ NULL, ctable);
ctable->unref();
bm.lockPixels();
« no previous file with comments | « samplecode/SampleTiling.cpp ('k') | samplecode/SampleUnpremul.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698