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

Unified Diff: src/images/SkImageDecoder.cpp

Issue 25275004: store SkAlphaType inside SkBitmap, on road to support unpremul (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 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
Index: src/images/SkImageDecoder.cpp
diff --git a/src/images/SkImageDecoder.cpp b/src/images/SkImageDecoder.cpp
index 15cd1a60c0dd6dc27bf517f0a85d9453e5301e70..3ee41124c01ef68186cd2c7d2ffdaa9395ce6aef 100644
--- a/src/images/SkImageDecoder.cpp
+++ b/src/images/SkImageDecoder.cpp
@@ -245,8 +245,7 @@ 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->alphaType());
if (!this->allocPixelRef(dst, NULL)) {
SkDEBUGF(("failed to allocate pixels needed to crop the bitmap"));

Powered by Google App Engine
This is Rietveld 408576698