From: Eunki, Hong Date: Wed, 26 Mar 2025 02:10:57 +0000 (+0900) Subject: (Constraint) Bake constraint property only if value changed X-Git-Tag: dali_2.4.12~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c3cdf2a930418fcf568950d2d5f01d08e9000306;p=platform%2Fcore%2Fuifw%2Fdali-core.git (Constraint) Bake constraint property only if value changed Change-Id: I8aa0bd9b0a5f2f41f0466f8bba278ac978327946 Signed-off-by: Eunki, Hong --- diff --git a/dali/internal/update/animation/scene-graph-constraint.h b/dali/internal/update/animation/scene-graph-constraint.h index dc6a86760..2b8a8ccf7 100644 --- a/dali/internal/update/animation/scene-graph-constraint.h +++ b/dali/internal/update/animation/scene-graph-constraint.h @@ -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); }