(Constraint) Bake constraint property only if value changed 25/321625/1
authorEunki, Hong <eunkiki.hong@samsung.com>
Wed, 26 Mar 2025 02:10:57 +0000 (11:10 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Wed, 26 Mar 2025 02:10:57 +0000 (11:10 +0900)
Change-Id: I8aa0bd9b0a5f2f41f0466f8bba278ac978327946
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
dali/internal/update/animation/scene-graph-constraint.h

index dc6a86760cd58ae4acc061e17698f74f08e9caf1..2b8a8ccf72d657f62fcf12decb7d7e0f66d930e5 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_SCENE_GRAPH_CONSTRAINT_H
 
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -94,6 +94,11 @@ public:
               // The first observer is the target of the constraint
               mObservedOwners[0]->SetUpdated(true);
             }
+            // Optionally bake the final value
+            if(Dali::Constraint::BAKE == mRemoveAction)
+            {
+              mTargetProperty.Bake(updateBufferIndex, current);
+            }
           }
         }
         else
@@ -105,15 +110,15 @@ public:
               // The first observer is the target of the constraint
               mObservedOwners[0]->SetUpdated(true);
             }
+            // Optionally bake the final value
+            if(Dali::Constraint::BAKE == mRemoveAction)
+            {
+              mTargetProperty.Bake(updateBufferIndex, current);
+            }
           }
         }
 
-        // Optionally bake the final value
-        if(Dali::Constraint::BAKE == mRemoveAction)
-        {
-          mTargetProperty.Bake(updateBufferIndex, current);
-        }
-        else
+        if(Dali::Constraint::DISCARD == mRemoveAction)
         {
           mTargetProperty.Set(updateBufferIndex, current);
         }