[NUI] Clear old resources cached data
authorEunki, Hong <eunkiki.hong@samsung.com>
Thu, 22 Jun 2023 05:40:56 +0000 (14:40 +0900)
committerSangHyeon Jade Lee <dltkdgus1764@gmail.com>
Wed, 28 Jun 2023 06:29:15 +0000 (15:29 +0900)
After overhead reducetion patch #5280 merged, Some side effect occured.

Previously we always ask some properties to dali side visual.
But now we return cached value in NUI.

Since URL property clear-up all properties, to fit previous logic,
let we also clean-up cached properties. (Actually, mark only for this case)

Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
src/Tizen.NUI/src/public/BaseComponents/LottieAnimationView.cs

index 5dd2c4f..6d5894d 100755 (executable)
@@ -133,9 +133,16 @@ namespace Tizen.NUI.BaseComponents
         {
             set
             {
+                // Reset cached infomations.
+                currentStates.contentInfo = null;
+                currentStates.mark1 = null;
+                currentStates.mark2 = null;
+                currentStates.framePlayRangeMin = -1;
+                currentStates.framePlayRangeMax = -1;
+                currentStates.totalFrame = -1;
+
                 string ret = (value == null ? "" : value);
                 currentStates.url = ret;
-                currentStates.totalFrame = -1; // Reset cached totalFrame value;
 
                 NUILog.Debug($"<[{GetId()}]SET url={currentStates.url}");
 
@@ -159,8 +166,6 @@ namespace Tizen.NUI.BaseComponents
                 // All states applied well.
                 currentStates.changed = false;
 
-                currentStates.contentInfo = null;
-
                 if (currentStates.scale != 1.0f)
                 {
                     Scale = new Vector3(currentStates.scale, currentStates.scale, currentStates.scale);