Fix damage for layers for projection receivers
Bug: 16880228
Change-Id: I59ab760a21f49cc2cac0d8936b173cff292e6114
diff --git a/libs/hwui/AnimatorManager.cpp b/libs/hwui/AnimatorManager.cpp
index 27b0893..7221295a4 100644
--- a/libs/hwui/AnimatorManager.cpp
+++ b/libs/hwui/AnimatorManager.cpp
@@ -66,22 +66,26 @@
class AnimateFunctor {
public:
AnimateFunctor(RenderNode& target, TreeInfo& info)
- : mTarget(target), mInfo(info) {}
+ : dirtyMask(0), mTarget(target), mInfo(info) {}
bool operator() (BaseRenderNodeAnimator* animator) {
+ dirtyMask |= animator->dirtyMask();
bool remove = animator->animate(mInfo);
if (remove) {
animator->decStrong(0);
}
return remove;
}
+
+ uint32_t dirtyMask;
+
private:
RenderNode& mTarget;
TreeInfo& mInfo;
};
-void AnimatorManager::animate(TreeInfo& info) {
- if (!mAnimators.size()) return;
+uint32_t AnimatorManager::animate(TreeInfo& info) {
+ if (!mAnimators.size()) return 0;
// TODO: Can we target this better? For now treat it like any other staging
// property push and just damage self before and after animators are run
@@ -97,6 +101,8 @@
mParent.mProperties.updateMatrix();
info.damageAccumulator->pushTransform(&mParent);
mParent.damageSelf(info);
+
+ return functor.dirtyMask;
}
} /* namespace uirenderer */