rmistry 2016-04-27 07:31:23 -07:00 committed by Commit bot
parent 338eaea602
commit 6f47dbaff5

View File

@ -82,7 +82,9 @@ struct Sniffer : public SkPixelSerializer {
SkBitmap bitmap;
SkImageInfo info = codec->getInfo().makeColorType(kN32_SkColorType);
bitmap.allocPixels(info);
if (SkCodec::kSuccess != codec->getPixels(info, bitmap.getPixels(), bitmap.rowBytes()))
const SkCodec::Result result = codec->getPixels(
info, bitmap.getPixels(), bitmap.rowBytes());
if (SkCodec::kIncompleteInput != result && SkCodec::kSuccess != result)
{
SkDebugf("Decoding failed for %s\n", skpName.c_str());
gSkpToUnknownCount[skpName]++;