summaryrefslogtreecommitdiffstats
path: root/libs/hwui/Animator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/Animator.cpp')
-rw-r--r--libs/hwui/Animator.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/hwui/Animator.cpp b/libs/hwui/Animator.cpp
index b80f7e9..eff3011 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());