aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm
diff options
context:
space:
mode:
authorGravatar Matt Sarett <msarett@google.com>2017-03-02 12:07:46 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-03 15:13:17 +0000
commit05cb4c3e509449b0b7332ad563acfcb194b86a07 (patch)
tree709374904c0e664fecab41d2183d45c5f3af6468 /dm
parent34a3256e6c38b00932a648f9caaf36c4919fcdf2 (diff)
Use non-fatal errors for WIC decoding failures
This should fix flakiness on the Win 2k8 bots. BUG=skia: Change-Id: Ibdd33279a092172f0b154493f59790a8db9f58bd Reviewed-on: https://skia-review.googlesource.com/9142 Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
Diffstat (limited to 'dm')
-rw-r--r--dm/DMSrcSink.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index 1a353810e9..1130397a76 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -949,7 +949,17 @@ Error ImageGenSrc::draw(SkCanvas* canvas) const {
int colorCount = 256;
if (!gen->getPixels(decodeInfo, pixels.get(), rowBytes, colorPtr, &colorCount)) {
- return SkStringPrintf("Image generator could not getPixels() for %s\n", fPath.c_str());
+ SkString err =
+ SkStringPrintf("Image generator could not getPixels() for %s\n", fPath.c_str());
+
+#if defined(SK_BUILD_FOR_WIN)
+ if (kPlatform_Mode == fMode) {
+ // Do not issue a fatal error for WIC flakiness.
+ return Error::Nonfatal(err);
+ }
+#endif
+
+ return err;
}
draw_to_canvas(canvas, decodeInfo, pixels.get(), rowBytes, colorPtr, colorCount,