aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/images
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-02-20 21:04:40 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-02-20 21:04:40 +0000
commit0a097ea91cbbda7d1bb408818a772c5c783cc807 (patch)
tree73f07a5c6cc6ac8c0b322de46633415a3e479bdf /src/images
parent900ecf2f1579d42c9d2959831787af0346320f86 (diff)
Fix bug in deferred decoding where we don't properly pass the unpremul option to the codec.
R=reed@google.com, scroggo@google.com Author: djsollen@google.com Review URL: https://codereview.chromium.org/172873003 git-svn-id: http://skia.googlecode.com/svn/trunk@13521 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/images')
-rw-r--r--src/images/SkImageRef.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/images/SkImageRef.cpp b/src/images/SkImageRef.cpp
index f3cc9e5590..458aa2aa5a 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;
}
}