aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm/DMSrcSink.cpp
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2015-03-05 08:40:28 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-03-05 08:40:28 -0800
commit4089ef7c982592fadeec441438c551ffb4c746be (patch)
tree3e9cd0e470ada3c46a46836566ca16e1aee2b505 /dm/DMSrcSink.cpp
parent64de1e179012302d5f3b805d0736a583ad91c6a2 (diff)
DM: support non-fatal errors
Tasks that produce a non-fatal error will bail out before writing their output to disk and hash to dm.json, but not count as failures. This also makes true failures bail out before writing their results. If the DM program failed, we probably don't want to triage that image result. We use this new feature first to skip image subset decoding when we detect it's not supported. Here's a snippet of an example run, where in this case only .webp are subset decodable: ... ( 15MB 12) 172µs 8888 subset color_wheel.jpg (skipped: Subset decoding not supported.) ( 15MB 11) 9.05ms 8888 subset randPixels.webp ( 16MB 10) 863µs 8888 subset baby_tux.png (skipped: Subset decoding not supported.) ... Only outputs corresponding to the .webp show up, both on disk and in the .json. BUG=skia: Review URL: https://codereview.chromium.org/980333002
Diffstat (limited to 'dm/DMSrcSink.cpp')
-rw-r--r--dm/DMSrcSink.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index 2060ce2d68..d99f0115b3 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -92,7 +92,7 @@ Error ImageSrc::draw(SkCanvas* canvas) const {
stream->rewind();
int w,h;
if (!decoder->buildTileIndex(stream.detach(), &w, &h) || w*h == 1) {
- return ""; // Not an error. Subset decoding is not always supported.
+ return Error::Nonfatal("Subset decoding not supported.");
}
// Divide the image into subsets that cover the entire image.