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

Unified Diff: Source/platform/graphics/ImageSource.h

Issue 284043003: Looping of animated WebP: Loop count off-by-one (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: comments Created 6 years, 7 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 | Source/platform/image-decoders/webp/WEBPImageDecoder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/ImageSource.h
diff --git a/Source/platform/graphics/ImageSource.h b/Source/platform/graphics/ImageSource.h
index e431db94bb9bba6cde4cafbe4fab3a971f05557f..e599781c08ba5afd975d389842c9040fb286cdfc 100644
--- a/Source/platform/graphics/ImageSource.h
+++ b/Source/platform/graphics/ImageSource.h
@@ -42,8 +42,8 @@ class IntSize;
class NativeImageSkia;
class SharedBuffer;
-// Right now GIFs are the only recognized image format that supports animation.
-// The animation system and the constants below are designed with this in mind.
+// GIF and WebP support animation. The explanation below is in terms of GIF,
+// but the same constants are used for WebP, too.
// GIFs have an optional 16-bit unsigned loop count that describes how an
// animated GIF should be cycled. If the loop count is absent, the animation
// cycles once; if it is 0, the animation cycles infinitely; otherwise the
@@ -108,6 +108,9 @@ public:
bool getHotSpot(IntPoint&) const;
+ // Returns one of the cAnimationXXX constants at the top of the file, or
+ // a loop count. In the latter case, the actual number of times the animation
+ // cycles is one more than the loop count. See comment atop the file.
int repetitionCount();
size_t frameCount() const;
« no previous file with comments | « no previous file | Source/platform/image-decoders/webp/WEBPImageDecoder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698