diff options
author | John Reck <jreck@google.com> | 2014-06-02 11:00:09 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2014-06-02 11:00:09 -0700 |
commit | c6b3264e16f1d2b72e7f9508559981ce9970157c (patch) | |
tree | 4b9b4d78d238e04cdd5c0394b757d88276856d0a /libs/hwui/Animator.cpp | |
parent | 58136d02113ae768dc2cdf871a773bd34cc71583 (diff) |
Add setStartValue to RNA
Bug: 15198607
Should be good-enough for Ripples to use for pseudo-chaining
support.
Change-Id: Ia8666928ccb69ae401cb583751632a52bd928b63
Diffstat (limited to 'libs/hwui/Animator.cpp')
-rw-r--r-- | libs/hwui/Animator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/hwui/Animator.cpp b/libs/hwui/Animator.cpp index b80f7e936943..eff3011685a8 100644 --- a/libs/hwui/Animator.cpp +++ b/libs/hwui/Animator.cpp @@ -63,7 +63,6 @@ void BaseRenderNodeAnimator::setStartValue(float value) { void BaseRenderNodeAnimator::setupStartValueIfNecessary(RenderNode* target, TreeInfo& info) { if (mPlayState == NEEDS_START) { setStartValue(getValue(target)); - mPlayState = PENDING; } } @@ -154,7 +153,8 @@ RenderPropertyAnimator::RenderPropertyAnimator(RenderProperty property, float fi } void RenderPropertyAnimator::onAttached(RenderNode* target) { - if (target->isPropertyFieldDirty(mPropertyAccess->dirtyMask)) { + if (mPlayState == NEEDS_START + && target->isPropertyFieldDirty(mPropertyAccess->dirtyMask)) { setStartValue((target->stagingProperties().*mPropertyAccess->getter)()); } (target->mutateStagingProperties().*mPropertyAccess->setter)(finalValue()); |