Ensure initialize fransform data
[platform/core/uifw/dali-core.git] / dali / internal / update / nodes / node.cpp
index 5dc2e99..55447df 100644 (file)
@@ -25,6 +25,8 @@
 #include <dali/public-api/common/constants.h>
 #include <dali/public-api/common/dali-common.h>
 
+#include <dali/internal/update/common/resetter-manager.h> ///< For AddInitializeResetter
+
 namespace
 {
 // Memory pool used to allocate new nodes. Memory used by this pool will be released when process dies
@@ -80,7 +82,8 @@ void Node::Delete(Node* node)
 }
 
 Node::Node()
-: mOrientation(),                                                               // Initialized to identity by default
+: mTransformManagerData(),                                                      // Initialized to use invalid id by default
+  mOrientation(),                                                               // Initialized to identity by default
   mWorldPosition(TRANSFORM_PROPERTY_WORLD_POSITION, Vector3(0.0f, 0.0f, 0.0f)), // Zero initialized by default
   mWorldScale(TRANSFORM_PROPERTY_WORLD_SCALE, Vector3(1.0f, 1.0f, 1.0f)),
   mWorldOrientation(), // Initialized to identity by default
@@ -107,7 +110,8 @@ Node::Node()
   mIsCamera(false),
   mPositionUsesAnchorPoint(true),
   mTransparent(false),
-  mUpdateAreaChanged(false)
+  mUpdateAreaChanged(false),
+  mUseTextureUpdateArea(false)
 {
 #ifdef DEBUG_ENABLED
   gNodeCount++;
@@ -162,6 +166,11 @@ bool Node::IsAnimationPossible() const
   return mIsConnectedToSceneGraph;
 }
 
+void Node::AddInitializeResetter(ResetterManager& manager) const
+{
+  manager.AddNodeResetter(*this);
+}
+
 void Node::ConnectChild(Node* childNode)
 {
   DALI_ASSERT_ALWAYS(this != childNode);
@@ -237,6 +246,8 @@ void Node::RemoveRenderer(const RendererKey& renderer)
   {
     if(mRenderers[i] == renderer)
     {
+      renderer->DetachFromNodeDataProvider(*this);
+
       SetUpdated(true);
       mRenderers.Erase(mRenderers.Begin() + i);
       return;