Index: samplecode/SampleDitherBitmap.cpp |
diff --git a/samplecode/SampleDitherBitmap.cpp b/samplecode/SampleDitherBitmap.cpp |
index df727c42033867ddbda6039dc27a0c4a1eb0ee32..10d899f1cf672ebca6da6809ed62723af07ed2b1 100644 |
--- a/samplecode/SampleDitherBitmap.cpp |
+++ b/samplecode/SampleDitherBitmap.cpp |
@@ -101,11 +101,13 @@ protected: |
static void setBitmapOpaque(SkBitmap* bm, bool isOpaque) { |
SkAutoLockPixels alp(*bm); // needed for ctable |
- bm->setIsOpaque(isOpaque); |
+ bm->setAlphaType(isOpaque ? kOpaque_SkAlphaType : kPremul_SkAlphaType); |
+#if 0 |
SkColorTable* ctable = bm->getColorTable(); |
if (ctable) { |
ctable->setIsOpaque(isOpaque); |
} |
+#endif |
} |
static void draw2(SkCanvas* canvas, const SkBitmap& bm) { |