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

Unified Diff: dm/DM.cpp

Issue 1704433003: Make kInvalidConversion a fatal failure in DMSrcSink (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Third time is the charm Created 4 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 | dm/DMSrcSink.cpp » ('j') | dm/DMSrcSink.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DM.cpp
diff --git a/dm/DM.cpp b/dm/DM.cpp
index c87f578babf22df5bf86aec95ace2b86d27ca205..c8b65842d042f660abbf5614407b99fa46e0399d 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -354,14 +354,14 @@ static void push_codec_srcs(Path path) {
uint32_t numColorTypes;
switch (codec->getInfo().colorType()) {
case kGray_8_SkColorType:
- // FIXME: Is this a long term solution for testing wbmps decodes to kIndex8?
- // Further discussion on this topic is at https://bug.skia.org/3683 .
- // This causes us to try to convert grayscale jpegs to kIndex8. We currently
- // fail non-fatally in this case.
colorTypes[0] = CodecSrc::kGetFromCanvas_DstColorType;
colorTypes[1] = CodecSrc::kGrayscale_Always_DstColorType;
- colorTypes[2] = CodecSrc::kIndex8_Always_DstColorType;
- numColorTypes = 3;
+ if (kWBMP_SkEncodedFormat == codec->getEncodedFormat()) {
+ colorTypes[2] = CodecSrc::kIndex8_Always_DstColorType;
+ numColorTypes = 3;
+ } else {
+ numColorTypes = 2;
+ }
break;
case kIndex_8_SkColorType:
colorTypes[0] = CodecSrc::kGetFromCanvas_DstColorType;
« no previous file with comments | « no previous file | dm/DMSrcSink.cpp » ('j') | dm/DMSrcSink.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698