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>
diff --git a/tests/AnimatedImageTest.cpp b/tests/AnimatedImageTest.cpp
index 584a69c..cbbef2d 100644
--- a/tests/AnimatedImageTest.cpp
+++ b/tests/AnimatedImageTest.cpp
@@ -130,7 +130,7 @@
         for (size_t i = 0; i < frameInfos.size(); ++i) {
             double next = animatedImage->update(currentTime);
             if (i == frameInfos.size() - 1 && defaultRepetitionCount == 0) {
-                REPORTER_ASSERT(r, next == std::numeric_limits<double>::max());
+                REPORTER_ASSERT(r, next == SkAnimatedImage::kNotRunning);
                 REPORTER_ASSERT(r, !animatedImage->isRunning());
                 REPORTER_ASSERT(r, animatedImage->isFinished());
             } else {
@@ -188,7 +188,7 @@
 
             currentTime = next;
             double stoppedNext = animatedImage->update(currentTime);
-            REPORTER_ASSERT(r, stoppedNext == std::numeric_limits<double>::max());
+            REPORTER_ASSERT(r, stoppedNext == SkAnimatedImage::kNotRunning);
             if (!testDraw(animatedImage, i)) {
                 ERRORF(r, "Advanced the frame while stopped?");
                 failed = true;
@@ -223,9 +223,12 @@
                     double next = animatedImage->update(currentTime);
                     if (animatedImage->isRunning()) {
                         currentTime = next;
+                    } else {
+                        REPORTER_ASSERT(r, next == SkAnimatedImage::kNotRunning);
                     }
                 }
             }
+
             if (animatedImage->isRunning()) {
                 ERRORF(r, "%s animation still running after %i loops", file, loopCount);
             }