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>
This commit is contained in:
Matt Sarett 2017-03-02 12:07:46 -05:00 committed by Skia Commit-Bot
parent 34a3256e6c
commit 05cb4c3e50

View File

@ -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,