diff options
author | Chet Haase <chet@google.com> | 2014-09-05 16:53:25 -0700 |
---|---|---|
committer | Chet Haase <chet@google.com> | 2014-09-10 21:21:53 +0000 |
commit | 6f6578e81c1df207da47e2e1337382341f271206 (patch) | |
tree | d6ce571eb3ce3a5997e05e4624c3364a593a9cb1 /core/java/android/animation | |
parent | 9da6c905772c6ba1d7dff91593ba9f9cf85d2483 (diff) | |
download | frameworks_base-6f6578e81c1df207da47e2e1337382341f271206.zip frameworks_base-6f6578e81c1df207da47e2e1337382341f271206.tar.gz frameworks_base-6f6578e81c1df207da47e2e1337382341f271206.tar.bz2 |
Use constant state in AnimatedVectorDrawable
Complex animated vector drawables can be expensive to load due to
sub-optimal parsing of the String-based pathData. Suffering that penalty
every time the same drawable is loaded (such as material-themed
ProgressBars) is painful.
The new approach caches constant state of both the VectorDrawable (including
the pathData geometry) and the animators (which includes potentially expensive
path-based interpolators).
issue #17366831 Material ProgressBar taking 200+ms to inflate
Change-Id: Iba3b541e24cfce8c07f5aa9fe6aa7d7b92b2fe1c
Diffstat (limited to 'core/java/android/animation')
-rw-r--r-- | core/java/android/animation/AnimatorSet.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/java/android/animation/AnimatorSet.java b/core/java/android/animation/AnimatorSet.java index 7c13dbe..0aa8fdd 100644 --- a/core/java/android/animation/AnimatorSet.java +++ b/core/java/android/animation/AnimatorSet.java @@ -636,6 +636,7 @@ public final class AnimatorSet extends Animator { anim.mNodes = new ArrayList<Node>(); anim.mSortedNodes = new ArrayList<Node>(); anim.mReversible = mReversible; + anim.mSetListener = null; // Walk through the old nodes list, cloning each node and adding it to the new nodemap. // One problem is that the old node dependencies point to nodes in the old AnimatorSet. |