summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2014-09-06 00:22:23 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-09-06 00:22:25 +0000
commit3207ffe12045ed6d8a2ea04993738cf71320183d (patch)
tree41d357f5b0a6ed16196cc51b31c35a3713d4610e /libs
parent9ffe8c06e5baa730229fd5eaeaccb7ff8f8d9518 (diff)
parentf5945a0c8bb868f978d9d0d22043a8b44464a86e (diff)
downloadframeworks_base-3207ffe12045ed6d8a2ea04993738cf71320183d.zip
frameworks_base-3207ffe12045ed6d8a2ea04993738cf71320183d.tar.gz
frameworks_base-3207ffe12045ed6d8a2ea04993738cf71320183d.tar.bz2
Merge "Disable RT-anim for AnimatorSet" into lmp-dev
Diffstat (limited to 'libs')
-rw-r--r--libs/hwui/Animator.h5
-rw-r--r--libs/hwui/AnimatorManager.cpp3
2 files changed, 8 insertions, 0 deletions
diff --git a/libs/hwui/Animator.h b/libs/hwui/Animator.h
index 1ab6235..35a4a09 100644
--- a/libs/hwui/Animator.h
+++ b/libs/hwui/Animator.h
@@ -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(); }
@@ -101,6 +105,7 @@ protected:
nsecs_t mStartTime;
nsecs_t mDuration;
nsecs_t mStartDelay;
+ bool mMayRunAsync;
sp<AnimationListener> mListener;
diff --git a/libs/hwui/AnimatorManager.cpp b/libs/hwui/AnimatorManager.cpp
index e06d800..c28fb88 100644
--- a/libs/hwui/AnimatorManager.cpp
+++ b/libs/hwui/AnimatorManager.cpp
@@ -90,6 +90,9 @@ public:
if (animator->isRunning()) {
mInfo.out.hasAnimations = true;
}
+ if (CC_UNLIKELY(!animator->mayRunAsync())) {
+ mInfo.out.requiresUiRedraw = true;
+ }
}
return remove;
}