aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm/DM.cpp
diff options
context:
space:
mode:
authorGravatar msarett <msarett@google.com>2016-02-16 13:24:54 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-02-16 13:24:54 -0800
commit55f7bdd956bf73dd2501a35a646870c1aebb34b7 (patch)
tree8a438ae3594d5cbd0b993091c20b4b8df96a1474 /dm/DM.cpp
parent4691d99d7ede02c86c09312b0da56a4460f69940 (diff)
Make kInvalidConversion a fatal failure in DMSrcSink
We just need to abort early on tests that we know are invalid conversions. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1704433003 Review URL: https://codereview.chromium.org/1704433003
Diffstat (limited to 'dm/DM.cpp')
-rw-r--r--dm/DM.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/dm/DM.cpp b/dm/DM.cpp
index c87f578bab..c8b65842d0 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;