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

Unified Diff: samplecode/SampleDitherBitmap.cpp

Issue 611093002: remove alphatype from colortable (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update codecs Created 6 years, 3 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 | « include/core/SkPicture.h ('k') | src/core/SkColorTable.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleDitherBitmap.cpp
diff --git a/samplecode/SampleDitherBitmap.cpp b/samplecode/SampleDitherBitmap.cpp
index e05d074f3b1ee4b8fc5b40b125c564502dd7183b..d825c71a505a3ccef223c83758a116154774aa79 100644
--- a/samplecode/SampleDitherBitmap.cpp
+++ b/samplecode/SampleDitherBitmap.cpp
@@ -57,11 +57,10 @@ static SkBitmap make_bitmap() {
for (int i = 0; i < 256; i++) {
c[i] = SkPackARGB32(0xFF, i, 0, 0);
}
- SkColorTable* ctable = new SkColorTable(c, 256, kOpaque_SkAlphaType);
+ SkColorTable* ctable = new SkColorTable(c, 256);
SkBitmap bm;
- bm.allocPixels(SkImageInfo::Make(256, 32, kIndex_8_SkColorType,
- kPremul_SkAlphaType),
+ bm.allocPixels(SkImageInfo::Make(256, 32, kIndex_8_SkColorType, kPremul_SkAlphaType),
NULL, ctable);
ctable->unref();
« no previous file with comments | « include/core/SkPicture.h ('k') | src/core/SkColorTable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698