Remove animation value change from push staging
This CL ensures that animation values are only updated during
animation pulses.
This CL also includes the revert of
https://googleplex-android-review.git.corp.google.com/#/c/1285913/
BUG: 30659748
Change-Id: Iadc84462dc61157efd3c18a23767bba9faf00f6e
diff --git a/libs/hwui/Animator.h b/libs/hwui/Animator.h
index 9476750..ef96582 100644
--- a/libs/hwui/Animator.h
+++ b/libs/hwui/Animator.h
@@ -159,6 +159,17 @@
Cancel,
End
};
+
+ // Defines different actions upon finish.
+ enum class Action {
+ // For animations that got canceled or finished normally. no more action needs to be done.
+ None,
+ // For animations that get reset, the reset will happen in the next animation pulse.
+ Reset,
+ // For animations being ended, in the next animation pulse the animation will skip to end.
+ End
+ };
+
inline void checkMutable();
virtual void transitionToRunning(AnimationContext& context);
void doSetStartValue(float value);
@@ -166,7 +177,7 @@
void resolveStagingRequest(Request request);
std::vector<Request> mStagingRequests;
-
+ Action mPendingActionUponFinish = Action::None;
};
class RenderPropertyAnimator : public BaseRenderNodeAnimator {