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

Unified Diff: dm/DMSrcSink.cpp

Issue 1663323002: Fix Unpremul Index8 tests (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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: dm/DMSrcSink.cpp
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index 7a260e58202659ae8dff19e688cbd584c6284643..9576f69d6708cc7214e87669248dafb1e8a45ca6 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,
« 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