Index: src/images/SkImageDecoder.cpp |
diff --git a/src/images/SkImageDecoder.cpp b/src/images/SkImageDecoder.cpp |
index 15cd1a60c0dd6dc27bf517f0a85d9453e5301e70..6787a5f80aad402f8a1c332bdb2f94b636323605 100644 |
--- a/src/images/SkImageDecoder.cpp |
+++ b/src/images/SkImageDecoder.cpp |
@@ -245,8 +245,8 @@ bool SkImageDecoder::cropBitmap(SkBitmap *dst, SkBitmap *src, int sampleSize, |
} |
// if the destination has no pixels then we must allocate them. |
if (dst->isNull()) { |
- dst->setConfig(src->getConfig(), w, h); |
- dst->setIsOpaque(src->isOpaque()); |
+ dst->setConfig(src->getConfig(), w, h, 0, src->isOpaque() ? |
scroggo
2013/10/18 20:04:34
src->alphaType()
reed1
2013/10/18 21:37:35
Done.
|
+ kOpaque_SkAlphaType : kPremul_SkAlphaType); |
if (!this->allocPixelRef(dst, NULL)) { |
SkDEBUGF(("failed to allocate pixels needed to crop the bitmap")); |