X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fupdate%2Fanimation%2Fscene-graph-constraint.h;h=dc6a86760cd58ae4acc061e17698f74f08e9caf1;hb=0ec8b37a80208c66d87e4322092d40694092bf81;hp=d7ba807f28e83e57bc45fae16c48b39fea291768;hpb=adae31cf70bdeed19789edc694d4baaf2fc67f21;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/update/animation/scene-graph-constraint.h b/dali/internal/update/animation/scene-graph-constraint.h index d7ba807..dc6a867 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) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2023 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. @@ -80,8 +80,34 @@ public: if(mFunc->InputsInitialized()) { PropertyType current = mTargetProperty.Get(updateBufferIndex); + PropertyType old = mTargetProperty.Get(!updateBufferIndex); + mFunc->Apply(updateBufferIndex, current); + // Compare with value of the previous frame + if constexpr(std::is_same_v) + { + if(!Equals(old, current)) + { + if(!mObservedOwners.Empty()) + { + // The first observer is the target of the constraint + mObservedOwners[0]->SetUpdated(true); + } + } + } + else + { + if(old != current) + { + if(!mObservedOwners.Empty()) + { + // The first observer is the target of the constraint + mObservedOwners[0]->SetUpdated(true); + } + } + } + // Optionally bake the final value if(Dali::Constraint::BAKE == mRemoveAction) {