Index: src/images/SkImageRef.cpp |
diff --git a/src/images/SkImageRef.cpp b/src/images/SkImageRef.cpp |
index f3cc9e55901395f9b9fafe5a2f1323de4775e532..458aa2aa5abeec269ff95bd77240455038ab00d8 100644 |
--- a/src/images/SkImageRef.cpp |
+++ b/src/images/SkImageRef.cpp |
@@ -121,13 +121,12 @@ bool SkImageRef::prepareBitmap(SkImageDecoder::Mode mode) { |
codec->setSampleSize(fSampleSize); |
codec->setDitherImage(fDoDither); |
+ codec->setRequireUnpremultipliedColors(this->info().fAlphaType == kUnpremul_SkAlphaType); |
if (this->onDecode(codec, fStream, &fBitmap, fBitmap.config(), mode)) { |
if (kOpaque_SkAlphaType == fBitmap.alphaType()) { |
this->changeAlphaType(kOpaque_SkAlphaType); |
} |
- SkASSERT(this->info().fColorType == fBitmap.colorType()); |
- SkASSERT(this->info().fWidth == fBitmap.width()); |
- SkASSERT(this->info().fHeight == fBitmap.height()); |
+ SkASSERT(this->info() == fBitmap.info()); |
return true; |
} |
} |