Revert "[Tizen] Print logs if dali skip rendering"
[platform/core/uifw/dali-core.git] / dali / internal / update / manager / update-manager.cpp
index c45d9af..d7771cc 100644 (file)
@@ -596,6 +596,17 @@ void UpdateManager::StopAnimation(Animation* animation)
   mImpl->animationFinishedDuringUpdate = mImpl->animationFinishedDuringUpdate || animationFinished;
 }
 
+void UpdateManager::ClearAnimation(Animation* animation)
+{
+  DALI_ASSERT_DEBUG(animation && "NULL animation called to clear");
+
+  animation->Clear(mSceneGraphBuffers.GetUpdateBufferIndex());
+
+  // We should remove all notify lists what we requests before clear.
+  // TODO : Could we do this more faster?
+  Dali::EraseIf(mImpl->notifyRequiredAnimations, [&animation](const NotifierInterface::NotifyId& key) { return key == animation->GetNotifyId(); });
+}
+
 void UpdateManager::RemoveAnimation(Animation* animation)
 {
   DALI_ASSERT_DEBUG(animation && "NULL animation called to remove");
@@ -841,8 +852,8 @@ bool UpdateManager::Animate(BufferIndex bufferIndex, float elapsedSeconds)
     mImpl->animationFinishedDuringUpdate = mImpl->animationFinishedDuringUpdate || finished;
     animationLooped                      = animationLooped || looped;
 
-    // queue the notification on finished or stoped or looped (to update loop count)
-    if(finished || looped)
+    // queue the notification on finished or stoped
+    if(finished)
     {
       mImpl->notifyRequiredAnimations.PushBack(animation->GetNotifyId());
     }
@@ -1240,7 +1251,7 @@ void UpdateManager::PostRender()
   // Reset dirty flag
   for(auto&& renderer : mImpl->renderers)
   {
-    renderer->ResetDirtyFlag();
+    renderer->SetUpdated(false);
   }
 
   for(auto&& shader : mImpl->shaders)