Skip to content
This repository has been archived by the owner on Feb 25, 2025. It is now read-only.

Commit

Permalink
Add more comments to SkCodec::getRepetitionCount
Browse files Browse the repository at this point in the history
Bug: skia:
Change-Id: Icc2d7d78106cb587905a8ddb039bc9bf7ae6ad91
Reviewed-on: https://skia-review.googlesource.com/146021
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
  • Loading branch information
Nigel Tao authored and Skia Commit-Bot committed Aug 22, 2018
1 parent e6ab998 commit 96597c2
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions include/codec/SkCodec.h
Original file line number Diff line number Diff line change
Expand Up @@ -636,20 +636,25 @@ class SK_API SkCodec : SkNoncopyable {
*
* As such, future decoding calls may require a rewind.
*
* For single-frame images, this will return an empty vector.
* For still (non-animated) image codecs, this will return an empty vector.
*/
std::vector<FrameInfo> getFrameInfo();

static constexpr int kRepetitionCountInfinite = -1;

/**
* Return the number of times to repeat, if this image is animated.
* Return the number of times to repeat, if this image is animated. This number does not
* include the first play through of each frame. For example, a repetition count of 4 means
* that each frame is played 5 times and then the animation stops.
*
* It can return kRepetitionCountInfinite, a negative number, meaning that the animation
* should loop forever.
*
* May require reading the stream to find the repetition count.
*
* As such, future decoding calls may require a rewind.
*
* For single-frame images, this will return 0.
* For still (non-animated) image codecs, this will return 0.
*/
int getRepetitionCount() {
return this->onGetRepetitionCount();
Expand Down

0 comments on commit 96597c2

Please sign in to comment.