diff options
author | John Reck <jreck@google.com> | 2014-08-14 09:02:01 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2014-08-27 17:44:25 -0700 |
commit | 119907cd2575c56b1ebf66348b52e67aaf6a88d8 (patch) | |
tree | 9990e37a560021560316ac2cfc6cf4c64df9cb92 /libs/hwui/Animator.h | |
parent | 1698297daf8068bc9e6971d43744d48f1672bab2 (diff) |
Animator stuff
Bug: 17228458
Change-Id: Id884a429a512f9cd2be0ed16dbd0f10e92b4440d
Diffstat (limited to 'libs/hwui/Animator.h')
-rw-r--r-- | libs/hwui/Animator.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libs/hwui/Animator.h b/libs/hwui/Animator.h index 6dfe7b4a6d05..c52a93fddaa8 100644 --- a/libs/hwui/Animator.h +++ b/libs/hwui/Animator.h @@ -28,6 +28,8 @@ namespace android { namespace uirenderer { +class AnimationContext; +class BaseRenderNodeAnimator; class RenderNode; class RenderProperties; @@ -50,15 +52,17 @@ public: ANDROID_API void setListener(AnimationListener* listener) { mListener = listener; } + AnimationListener* listener() { return mListener.get(); } ANDROID_API void start() { mStagingPlayState = RUNNING; onStagingPlayStateChanged(); } ANDROID_API void end() { mStagingPlayState = FINISHED; onStagingPlayStateChanged(); } void attach(RenderNode* target); virtual void onAttached() {} void detach() { mTarget = 0; } - void pushStaging(TreeInfo& info); - bool animate(TreeInfo& info); + void pushStaging(AnimationContext& context); + bool animate(AnimationContext& context); + bool isRunning() { return mPlayState == RUNNING; } bool isFinished() { return mPlayState == FINISHED; } float finalValue() { return mFinalValue; } @@ -72,7 +76,7 @@ protected: virtual void setValue(RenderNode* target, float value) = 0; RenderNode* target() { return mTarget; } - void callOnFinishedListener(TreeInfo& info); + void callOnFinishedListener(AnimationContext& context); virtual void onStagingPlayStateChanged() {} @@ -100,7 +104,7 @@ protected: private: inline void checkMutable(); - virtual void transitionToRunning(TreeInfo& info); + virtual void transitionToRunning(AnimationContext& context); void doSetStartValue(float value); }; |