store SkAlphaType inside SkBitmap, on road to support unpremul
BUG=
R=bsalomon@google.com, scroggo@google.com
Review URL: https://codereview.chromium.org/25275004
git-svn-id: http://skia.googlecode.com/svn/trunk@11877 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/images/SkImageDecoder.cpp b/src/images/SkImageDecoder.cpp
index 15cd1a6..3ee4112 100644
--- a/src/images/SkImageDecoder.cpp
+++ b/src/images/SkImageDecoder.cpp
@@ -245,8 +245,7 @@
}
// 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->alphaType());
if (!this->allocPixelRef(dst, NULL)) {
SkDEBUGF(("failed to allocate pixels needed to crop the bitmap"));