#include <dali/internal/event/common/property-notification-impl.h>
#include <dali/internal/event/common/property-notifier.h>
#include <dali/internal/event/effects/shader-factory.h>
+#include <dali/internal/event/animation/animation-playlist.h>
#include <dali/internal/update/animation/scene-graph-animator.h>
#include <dali/internal/update/animation/scene-graph-animation.h>
struct UpdateManager::Impl
{
Impl( NotificationManager& notificationManager,
- CompleteNotificationInterface& animationFinishedNotifier,
+ CompleteNotificationInterface& animationPlaylist,
PropertyNotifier& propertyNotifier,
DiscardQueue& discardQueue,
RenderController& renderController,
: renderMessageDispatcher( renderManager, renderQueue, sceneGraphBuffers ),
notificationManager( notificationManager ),
transformManager(),
- animationFinishedNotifier( animationFinishedNotifier ),
+ animationPlaylist( animationPlaylist ),
propertyNotifier( propertyNotifier ),
shaderSaver( NULL ),
discardQueue( discardQueue ),
RenderMessageDispatcher renderMessageDispatcher; ///< Used for passing messages to the render-thread
NotificationManager& notificationManager; ///< Queues notification messages for the event-thread.
TransformManager transformManager; ///< Used to update the transformation matrices of the nodes
- CompleteNotificationInterface& animationFinishedNotifier; ///< Provides notification to applications when animations are finished.
+ CompleteNotificationInterface& animationPlaylist; ///< Holds handles to all the animations
PropertyNotifier& propertyNotifier; ///< Provides notification to applications when properties are modified.
ShaderSaver* shaderSaver; ///< Saves shader binaries.
DiscardQueue& discardQueue; ///< Nodes are added here when disconnected from the scene-graph.
AnimationContainer &animations = mImpl->animations;
AnimationIter iter = animations.Begin();
bool animationLooped = false;
+
while ( iter != animations.End() )
{
Animation* animation = *iter;
bool finished = false;
bool looped = false;
- animation->Update( bufferIndex, elapsedSeconds, looped, finished );
+ bool progressMarkerReached = false;
+ animation->Update( bufferIndex, elapsedSeconds, looped, finished, progressMarkerReached );
+
+ if ( progressMarkerReached )
+ {
+ mImpl->notificationManager.QueueMessage( Internal::NotifyProgressReachedMessage( mImpl->animationPlaylist, animation ) );
+ }
mImpl->animationFinishedDuringUpdate = mImpl->animationFinishedDuringUpdate || finished;
animationLooped = animationLooped || looped;
if ( mImpl->animationFinishedDuringUpdate || animationLooped )
{
// The application should be notified by NotificationManager, in another thread
- mImpl->notificationManager.QueueCompleteNotification( &mImpl->animationFinishedNotifier );
+ mImpl->notificationManager.QueueCompleteNotification( &mImpl->animationPlaylist );
}
}