aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorscroggo <scroggo@google.com>2015-10-06 10:47:52 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-06 10:47:52 -0700
commit85f0d5d6e6a8ae2d5bdfb784fdf426a89dad2c0e (patch)
tree1e38add1f4af36a0b8270239775326d5d4116868 /src
parent8b2bc252faed7c751cf9248c3833c0631f498b7d (diff)
downloadplatform_external_skqp-85f0d5d6e6a8ae2d5bdfb784fdf426a89dad2c0e.tar.gz
platform_external_skqp-85f0d5d6e6a8ae2d5bdfb784fdf426a89dad2c0e.tar.bz2
platform_external_skqp-85f0d5d6e6a8ae2d5bdfb784fdf426a89dad2c0e.zip
Allow SkIcoCodec to fail due to conversion
Even if the client chooses dimensions that were suggested by SkIcoCodec, it is possible for the color conversion to be incorrect, so it can still reach the exit case of kInvalidConversion. For example, when running nanobench, we attempt to decode the image to Alpha_8, which the codec does not support. This allows running nanobench in debug mode without asserting. BUG=skia:3418 Review URL: https://codereview.chromium.org/1389943002
Diffstat (limited to 'src')
-rw-r--r--src/codec/SkCodec_libico.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/codec/SkCodec_libico.cpp b/src/codec/SkCodec_libico.cpp
index 8b38148adf..62562a19d5 100644
--- a/src/codec/SkCodec_libico.cpp
+++ b/src/codec/SkCodec_libico.cpp
@@ -293,9 +293,6 @@ SkCodec::Result SkIcoCodec::onGetPixels(const SkImageInfo& dstInfo,
}
}
- // This should never be reached, since onDimensionsSupported should have rejected the
- // dimensions sooner.
- SkASSERT(false);
SkCodecPrintf("Error: No matching candidate image in ico.\n");
return result;
}