aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm
diff options
context:
space:
mode:
authorGravatar msarett <msarett@google.com>2016-02-03 15:31:18 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-02-03 15:31:18 -0800
commite1daa48b9a5f1724cbfa6b00ba964f7fdfe0c3d0 (patch)
tree2cf4e59544d90edf6c8a0b1fed6a7aebb46ebab6 /dm
parent095742419d0277a4fb0d499a05ff29b7506f1c5e (diff)
Fix Unpremul Index8 tests
Diffstat (limited to 'dm')
-rw-r--r--dm/DMSrcSink.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index 7a260e5820..9576f69d67 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -282,6 +282,10 @@ void premultiply_if_necessary(SkBitmap& bitmap) {
// No need to premultiply kGray or k565 outputs.
break;
}
+
+ // In the kIndex_8 case, the canvas won't even try to draw unless we mark the
+ // bitmap as kPremul.
+ bitmap.setAlphaType(kPremul_SkAlphaType);
}
bool get_decode_info(SkImageInfo* decodeInfo, SkColorType canvasColorType,