aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/android
diff options
context:
space:
mode:
authorGravatar Leon Scroggins III <scroggo@google.com>2018-01-22 12:31:21 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-23 22:21:40 +0000
commit8524c30a971cd22fe1e3e0fd3db5988fe23272b6 (patch)
tree37590e5dd2d38878a114e6b306defedde8561471 /include/android
parent980a48de64baf2f974f6c99096391280d1c1d22c (diff)
Make SkAnimatedImage::update return sentinel when stopped
Bug: b/63908092 Change-Id: I585f3d3efde1db4d5be36b11f19fe6e88f131608 Reviewed-on: https://skia-review.googlesource.com/98062 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
Diffstat (limited to 'include/android')
-rw-r--r--include/android/SkAnimatedImage.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/android/SkAnimatedImage.h b/include/android/SkAnimatedImage.h
index d2f4e3d66c..dc1ce0ac64 100644
--- a/include/android/SkAnimatedImage.h
+++ b/include/android/SkAnimatedImage.h
@@ -75,12 +75,16 @@ public:
bool isFinished() const { return fFinished; }
/**
+ * Returned by update if the animation is not running.
+ */
+ static constexpr double kNotRunning = -2.0;
+
+ /**
* Update the current time. If the image is animating, this may decode
* a new frame.
*
- * @return the time to show the next frame.
- * Returns numeric_limits<double>::max() if there is no max frame to
- * show, and -1.0 if the animation is not running.
+ * @return the time to show the next frame, or kNotRunning if the animation
+ * is not running.
*/
double update(double msecs);