Fix a case of kPartialSuccess.

Missed in https://codereview.chromium.org/647023006/

When JPEG decoder does not have the remainder of the image, it should
return kPartialSuccess.

BUG:b/17419670
BUG:b/18769124

Review URL: https://codereview.chromium.org/807983002
This commit is contained in:
scroggo 2014-12-17 06:55:02 -08:00 committed by Commit bot
parent b270fc105d
commit c6b8ffa0ac

View File

@ -724,7 +724,7 @@ SkImageDecoder::Result SkJPEGImageDecoder::onDecode(SkStream* stream, SkBitmap*
fill_below_level(y, bm);
cinfo.output_scanline = cinfo.output_height;
jpeg_finish_decompress(&cinfo);
return kSuccess;
return kPartialSuccess;
}
if (this->shouldCancelDecode()) {
return return_failure(cinfo, *bm, "shouldCancelDecode");