Revert "[Tizen] Initialize 'mDepthTreeDirty' member in stage-impl.cpp"
[platform/core/uifw/dali-core.git] / dali / internal / event / common / stage-impl.cpp
index c036a5d..905cfba 100644 (file)
 
 using Dali::Internal::SceneGraph::Node;
 
+namespace
+{
+#if defined(DEBUG_ENABLED)
+Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_DEPTH_TIMER" );
+#endif
+}
+
 namespace Dali
 {
 
@@ -664,6 +671,27 @@ void Stage::NotifyContextRegained()
   mContextRegainedSignal.Emit();
 }
 
+
+void Stage::RequestRebuildDepthTree()
+{
+  DALI_LOG_INFO(gLogFilter, Debug::General, "RequestRebuildDepthTree()\n");
+  mDepthTreeDirty = true;
+}
+
+void Stage::RebuildDepthTree()
+{
+  // If the depth tree needs rebuilding, do it in this frame only.
+  if( mDepthTreeDirty )
+  {
+    DALI_LOG_INFO(gLogFilter, Debug::Concise, "RebuildDepthTree() dirty:T\n");
+
+    ActorPtr actor( mRootLayer.Get() );
+    actor->RebuildDepthTree();
+    mDepthTreeDirty = false;
+  }
+}
+
+
 Stage::Stage( AnimationPlaylist& playlist,
               PropertyNotificationManager& propertyNotificationManager,
               SceneGraph::UpdateManager& updateManager,