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

Unified Diff: src/images/SkImageRef.cpp

Issue 172873003: Fix bug in deferred decoding where we don't properly pass the unpremul option to the codec. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698