Index: samplecode/SampleDitherBitmap.cpp |
diff --git a/samplecode/SampleDitherBitmap.cpp b/samplecode/SampleDitherBitmap.cpp |
index df727c42033867ddbda6039dc27a0c4a1eb0ee32..c65c125a54040229a44a5a90e240322753637454 100644 |
--- a/samplecode/SampleDitherBitmap.cpp |
+++ b/samplecode/SampleDitherBitmap.cpp |
@@ -101,7 +101,7 @@ protected: |
static void setBitmapOpaque(SkBitmap* bm, bool isOpaque) { |
SkAutoLockPixels alp(*bm); // needed for ctable |
- bm->setIsOpaque(isOpaque); |
+ bm->setAlphaType(isOpaque ? kOpaque_SkAlphaType : kPremul_SkAlphaType); |
SkColorTable* ctable = bm->getColorTable(); |
if (ctable) { |
ctable->setIsOpaque(isOpaque); |