Reorder node's children only required case.
[platform/core/uifw/dali-core.git] / dali / internal / update / common / property-owner.cpp
index 69ee2a4..1111f94 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -88,6 +88,7 @@ void PropertyOwner::Destroy()
 void PropertyOwner::ConnectToSceneGraph()
 {
   mIsConnectedToSceneGraph = true;
+  SetUpdated(true);
 
   // Notification for observers
   const ConstObserverIter endIter = mObservers.End();
@@ -112,6 +113,11 @@ void PropertyOwner::DisconnectFromSceneGraph(BufferIndex updateBufferIndex)
   mConstraints.Clear();
 }
 
+void PropertyOwner::ReserveProperties(int propertyCount)
+{
+  mCustomProperties.Reserve(propertyCount);
+}
+
 void PropertyOwner::InstallCustomProperty(OwnerPointer<PropertyBase>& property)
 {
   mCustomProperties.PushBack(property.Release());
@@ -152,11 +158,13 @@ PropertyOwner::PropertyOwner()
 void PropertyOwner::AddUniformMapping(const UniformPropertyMapping& map)
 {
   mUniformMaps.Add(map);
+  OnMappingChanged();
 }
 
 void PropertyOwner::RemoveUniformMapping(const ConstString& uniformName)
 {
   mUniformMaps.Remove(uniformName);
+  OnMappingChanged();
 }
 
 const UniformMap& PropertyOwner::GetUniformMap() const
@@ -164,16 +172,6 @@ const UniformMap& PropertyOwner::GetUniformMap() const
   return mUniformMaps;
 }
 
-void PropertyOwner::AddUniformMapObserver(UniformMap::Observer& observer)
-{
-  mUniformMaps.AddObserver(observer);
-}
-
-void PropertyOwner::RemoveUniformMapObserver(UniformMap::Observer& observer)
-{
-  mUniformMaps.RemoveObserver(observer);
-}
-
 } // namespace SceneGraph
 
 } // namespace Internal