aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/android
diff options
context:
space:
mode:
authorGravatar Leon Scroggins III <scroggo@google.com>2018-01-21 15:50:12 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-22 19:32:17 +0000
commit2cb6cb1f338e655f63fa258efeaa38988ec6a7b3 (patch)
tree127b8829c7acd55ec1d70676dc15ac6880d5af73 /include/android
parent0848fb0b3e3f465ec0de01ed7e0028cda32aa948 (diff)
Add SkAnimatedImage::isFinished
Bug: b/63908092 Allows Android to know when to call onAnimationEnd. Change-Id: I9cc102fb485e944ad5983eed9f0b941153128e88 Reviewed-on: https://skia-review.googlesource.com/97401 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
Diffstat (limited to 'include/android')
-rw-r--r--include/android/SkAnimatedImage.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/android/SkAnimatedImage.h b/include/android/SkAnimatedImage.h
index d74c6bec49..d2f4e3d66c 100644
--- a/include/android/SkAnimatedImage.h
+++ b/include/android/SkAnimatedImage.h
@@ -67,6 +67,14 @@ public:
bool isRunning() const { return fRunning && !fFinished; }
/**
+ * Whether the animation completed.
+ *
+ * Returns true after all repetitions are complete, or an error stops the
+ * animation. Gets reset to false if the animation is restarted.
+ */
+ bool isFinished() const { return fFinished; }
+
+ /**
* Update the current time. If the image is animating, this may decode
* a new frame.
*