Loading core/java/android/animation/AnimatorSet.java +4 −0 Original line number Diff line number Diff line Loading @@ -504,6 +504,10 @@ public final class AnimatorSet extends Animator { mStarted = true; mPaused = false; for (Node node : mNodes) { node.animation.setAllowRunningAsynchronously(false); } if (mDuration >= 0) { // If the duration was set on this AnimatorSet, pass it along to all child animations for (Node node : mNodes) { Loading core/java/android/view/RenderNodeAnimator.java +7 −0 Original line number Diff line number Diff line Loading @@ -453,6 +453,12 @@ public class RenderNodeAnimator extends Animator { throw new IllegalStateException("Cannot clone this animator"); } @Override public void setAllowRunningAsynchronously(boolean mayRunAsync) { checkMutable(); nSetAllowRunningAsync(mNativePtr.get(), mayRunAsync); } private static native long nCreateAnimator(int property, float finalValue); private static native long nCreateCanvasPropertyFloatAnimator( long canvasProperty, float finalValue); Loading @@ -466,6 +472,7 @@ public class RenderNodeAnimator extends Animator { private static native long nGetDuration(long nativePtr); private static native void nSetStartDelay(long nativePtr, long startDelay); private static native void nSetInterpolator(long animPtr, long interpolatorPtr); private static native void nSetAllowRunningAsync(long animPtr, boolean mayRunAsync); private static native void nStart(long animPtr, RenderNodeAnimator finishListener); private static native void nEnd(long animPtr); Loading core/jni/android_view_RenderNodeAnimator.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -159,6 +159,11 @@ static void setInterpolator(JNIEnv* env, jobject clazz, jlong animatorPtr, jlong animator->setInterpolator(interpolator); } static void setAllowRunningAsync(JNIEnv* env, jobject clazz, jlong animatorPtr, jboolean mayRunAsync) { BaseRenderNodeAnimator* animator = reinterpret_cast<BaseRenderNodeAnimator*>(animatorPtr); animator->setAllowRunningAsync(mayRunAsync); } static void start(JNIEnv* env, jobject clazz, jlong animatorPtr, jobject finishListener) { BaseRenderNodeAnimator* animator = reinterpret_cast<BaseRenderNodeAnimator*>(animatorPtr); if (finishListener) { Loading Loading @@ -191,6 +196,7 @@ static JNINativeMethod gMethods[] = { { "nGetDuration", "(J)J", (void*) getDuration }, { "nSetStartDelay", "(JJ)V", (void*) setStartDelay }, { "nSetInterpolator", "(JJ)V", (void*) setInterpolator }, { "nSetAllowRunningAsync", "(JZ)V", (void*) setAllowRunningAsync }, { "nStart", "(JLandroid/view/RenderNodeAnimator;)V", (void*) start }, { "nEnd", "(J)V", (void*) end }, #endif Loading libs/hwui/Animator.h +5 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,10 @@ public: mListener = listener; } AnimationListener* listener() { return mListener.get(); } ANDROID_API void setAllowRunningAsync(bool mayRunAsync) { mMayRunAsync = mayRunAsync; } bool mayRunAsync() { return mMayRunAsync; } ANDROID_API void start() { mStagingPlayState = RUNNING; onStagingPlayStateChanged(); } ANDROID_API void end() { mStagingPlayState = FINISHED; onStagingPlayStateChanged(); } Loading Loading @@ -101,6 +105,7 @@ protected: nsecs_t mStartTime; nsecs_t mDuration; nsecs_t mStartDelay; bool mMayRunAsync; sp<AnimationListener> mListener; Loading libs/hwui/AnimatorManager.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -90,6 +90,9 @@ public: if (animator->isRunning()) { mInfo.out.hasAnimations = true; } if (CC_UNLIKELY(!animator->mayRunAsync())) { mInfo.out.requiresUiRedraw = true; } } return remove; } Loading Loading
core/java/android/animation/AnimatorSet.java +4 −0 Original line number Diff line number Diff line Loading @@ -504,6 +504,10 @@ public final class AnimatorSet extends Animator { mStarted = true; mPaused = false; for (Node node : mNodes) { node.animation.setAllowRunningAsynchronously(false); } if (mDuration >= 0) { // If the duration was set on this AnimatorSet, pass it along to all child animations for (Node node : mNodes) { Loading
core/java/android/view/RenderNodeAnimator.java +7 −0 Original line number Diff line number Diff line Loading @@ -453,6 +453,12 @@ public class RenderNodeAnimator extends Animator { throw new IllegalStateException("Cannot clone this animator"); } @Override public void setAllowRunningAsynchronously(boolean mayRunAsync) { checkMutable(); nSetAllowRunningAsync(mNativePtr.get(), mayRunAsync); } private static native long nCreateAnimator(int property, float finalValue); private static native long nCreateCanvasPropertyFloatAnimator( long canvasProperty, float finalValue); Loading @@ -466,6 +472,7 @@ public class RenderNodeAnimator extends Animator { private static native long nGetDuration(long nativePtr); private static native void nSetStartDelay(long nativePtr, long startDelay); private static native void nSetInterpolator(long animPtr, long interpolatorPtr); private static native void nSetAllowRunningAsync(long animPtr, boolean mayRunAsync); private static native void nStart(long animPtr, RenderNodeAnimator finishListener); private static native void nEnd(long animPtr); Loading
core/jni/android_view_RenderNodeAnimator.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -159,6 +159,11 @@ static void setInterpolator(JNIEnv* env, jobject clazz, jlong animatorPtr, jlong animator->setInterpolator(interpolator); } static void setAllowRunningAsync(JNIEnv* env, jobject clazz, jlong animatorPtr, jboolean mayRunAsync) { BaseRenderNodeAnimator* animator = reinterpret_cast<BaseRenderNodeAnimator*>(animatorPtr); animator->setAllowRunningAsync(mayRunAsync); } static void start(JNIEnv* env, jobject clazz, jlong animatorPtr, jobject finishListener) { BaseRenderNodeAnimator* animator = reinterpret_cast<BaseRenderNodeAnimator*>(animatorPtr); if (finishListener) { Loading Loading @@ -191,6 +196,7 @@ static JNINativeMethod gMethods[] = { { "nGetDuration", "(J)J", (void*) getDuration }, { "nSetStartDelay", "(JJ)V", (void*) setStartDelay }, { "nSetInterpolator", "(JJ)V", (void*) setInterpolator }, { "nSetAllowRunningAsync", "(JZ)V", (void*) setAllowRunningAsync }, { "nStart", "(JLandroid/view/RenderNodeAnimator;)V", (void*) start }, { "nEnd", "(J)V", (void*) end }, #endif Loading
libs/hwui/Animator.h +5 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,10 @@ public: mListener = listener; } AnimationListener* listener() { return mListener.get(); } ANDROID_API void setAllowRunningAsync(bool mayRunAsync) { mMayRunAsync = mayRunAsync; } bool mayRunAsync() { return mMayRunAsync; } ANDROID_API void start() { mStagingPlayState = RUNNING; onStagingPlayStateChanged(); } ANDROID_API void end() { mStagingPlayState = FINISHED; onStagingPlayStateChanged(); } Loading Loading @@ -101,6 +105,7 @@ protected: nsecs_t mStartTime; nsecs_t mDuration; nsecs_t mStartDelay; bool mMayRunAsync; sp<AnimationListener> mListener; Loading
libs/hwui/AnimatorManager.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -90,6 +90,9 @@ public: if (animator->isRunning()) { mInfo.out.hasAnimations = true; } if (CC_UNLIKELY(!animator->mayRunAsync())) { mInfo.out.requiresUiRedraw = true; } } return remove; } Loading