Age down PropertyResetter when animator destroyed 56/295356/3
authorEunki, Hong <eunkiki.hong@samsung.com>
Thu, 6 Jul 2023 02:31:11 +0000 (11:31 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Thu, 6 Jul 2023 04:16:17 +0000 (13:16 +0900)
When PropertyOwner alive and Animator is destroyed,
(== AnimatorResetter::ObjectDestroyed called)
mRunning value become ACTIVE --> AGING.

In this case, IsFinished() value always return 'false', so
PropertyOwner hold the AnimatorResetter always.

This patch make we ensurely reduce the aging of AnimatorResetter and
ConstraintResetter.

Change-Id: I173f6780d73ab9e9ad104a20764f9fac6d9abcc9
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
dali/internal/update/common/property-resetter.h

index 68a3986..4fd1830 100644 (file)
@@ -81,6 +81,13 @@ public:
 
       mBaseProperty->ResetToBaseValue(updateBufferIndex);
     }
+
+    if(mRunning == AGING)
+    {
+      // If this resetter is aging now, make it as stopped.
+      // Now we can assume that this PropertyResetter is finished.
+      mRunning = STOPPED;
+    }
   };
 
   /**