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");
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());
}
// Reset dirty flag
for(auto&& renderer : mImpl->renderers)
{
- renderer->ResetDirtyFlag();
+ renderer->SetUpdated(false);
}
for(auto&& shader : mImpl->shaders)