Re-enable ViewPropAnimRT
Change-Id: I2f30547c4e2212747c479760dff4f3f901d1eaf3
diff --git a/libs/hwui/Animator.cpp b/libs/hwui/Animator.cpp
index eff3011..dc6d852 100644
--- a/libs/hwui/Animator.cpp
+++ b/libs/hwui/Animator.cpp
@@ -160,6 +160,10 @@
(target->mutateStagingProperties().*mPropertyAccess->setter)(finalValue());
}
+uint32_t RenderPropertyAnimator::dirtyMask() {
+ return mPropertyAccess->dirtyMask;
+}
+
float RenderPropertyAnimator::getValue(RenderNode* target) const {
return (target->properties().*mPropertyAccess->getter)();
}
diff --git a/libs/hwui/Animator.h b/libs/hwui/Animator.h
index 203cdff..6cb72c4c 100644
--- a/libs/hwui/Animator.h
+++ b/libs/hwui/Animator.h
@@ -61,6 +61,8 @@
bool isFinished() { return mPlayState == FINISHED; }
float finalValue() { return mFinalValue; }
+ ANDROID_API virtual uint32_t dirtyMask() { return 0; }
+
protected:
BaseRenderNodeAnimator(float finalValue);
virtual ~BaseRenderNodeAnimator();
@@ -112,6 +114,8 @@
ANDROID_API virtual void onAttached(RenderNode* target);
+ ANDROID_API virtual uint32_t dirtyMask();
+
protected:
virtual float getValue(RenderNode* target) const;
virtual void setValue(RenderNode* target, float value);
diff --git a/libs/hwui/RenderNode.h b/libs/hwui/RenderNode.h
index b2fe849..2d6d409 100644
--- a/libs/hwui/RenderNode.h
+++ b/libs/hwui/RenderNode.h
@@ -189,6 +189,8 @@
// UI thread only!
ANDROID_API void removeAnimator(const sp<BaseRenderNodeAnimator>& animator) {
mStagingAnimators.erase(animator);
+ // Force a sync of the staging property value
+ mDirtyPropertyFields |= animator->dirtyMask();
mNeedsAnimatorsSync = true;
}