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

Unified Diff: gm/animatedGif.cpp

Issue 2447863002: Report repetition count in SkCodec (Closed)
Patch Set: Return a bool, with multiple out parameters Created 4 years, 2 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
Index: gm/animatedGif.cpp
diff --git a/gm/animatedGif.cpp b/gm/animatedGif.cpp
index 6f7f0ddd1b2fe02885240e091a52a704813d47c5..7b5f50c39528b2dd3bd49e89a80899283d08e17e 100644
--- a/gm/animatedGif.cpp
+++ b/gm/animatedGif.cpp
@@ -129,7 +129,10 @@ private:
}
fFrame = 0;
- fFrameInfos = fCodec->getFrameInfo();
+ if (!fCodec->getFrameInfo(&fFrameInfos, nullptr)) {
+ SkDebugf("%s is not animated", FLAGS_animatedGif[0]);
+ return false;
+ }
fTotalFrames = fFrameInfos.size();
return true;
}
« no previous file with comments | « dm/DMSrcSink.cpp ('k') | include/codec/SkCodec.h » ('j') | include/codec/SkCodec.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698