Fix DMSrcSink bug
authormsarett <msarett@google.com>
Tue, 27 Oct 2015 14:12:24 +0000 (07:12 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 27 Oct 2015 14:12:24 +0000 (07:12 -0700)
We want to request premultiplied decodes.

BUG=skia:

Review URL: https://codereview.chromium.org/1419403003

dm/DMSrcSink.cpp

index cf9a6a2a2c8d840e5ad8c733821e3623a0672047..e0ec5e139ce988d07a8dbfe76a34b0ba2611a279 100644 (file)
@@ -264,7 +264,7 @@ bool get_decode_info(SkImageInfo* decodeInfo, const SkImageInfo& defaultInfo,
 
     // FIXME: Currently we cannot draw unpremultiplied sources.
     if (decodeInfo->alphaType() == kUnpremul_SkAlphaType) {
-        decodeInfo->makeAlphaType(kPremul_SkAlphaType);
+        *decodeInfo = decodeInfo->makeAlphaType(kPremul_SkAlphaType);
     }
     return true;
 }