Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: tools/get_images_from_skps.cpp

Issue 1917413003: Treat kIncompleteInput as successes in get_images_from_skps (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/get_images_from_skps.cpp
diff --git a/tools/get_images_from_skps.cpp b/tools/get_images_from_skps.cpp
index a78c412a1bf35f07742cde2de9d43c9aa1145679..11b99c214d1f9b5ea3753057033603ae23d60807 100644
--- a/tools/get_images_from_skps.cpp
+++ b/tools/get_images_from_skps.cpp
@@ -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]++;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698