+ // Recalculate elapsedFactor here
+ elapsedFactor = signSpeedFactor * mElapsedSeconds;
+
+ if( mLoopCount != 0 )
+ {
+ // Check If this animation is finished
+ ++mCurrentLoop;
+ if( mCurrentLoop >= mLoopCount )
+ {
+ DALI_ASSERT_DEBUG( mCurrentLoop == mLoopCount );
+ finished = true;
+
+ // The animation has now been played to completion
+ ++mPlayedCount;
+
+ // Make elapsed second as edge of range forcely.
+ mElapsedSeconds = edgeRangeSeconds + signSpeedFactor * Math::MACHINE_EPSILON_10;
+ UpdateAnimators(bufferIndex, finished && (mEndAction != Dali::Animation::DISCARD), finished );
+
+ // After update animation, mElapsedSeconds must be begin of value
+ mElapsedSeconds = playRangeStartSeconds + playRangeEndSeconds - edgeRangeSeconds;
+ mState = Stopped;
+ }
+ }
+
+ // when it is on looped state, 2 case to send progress signal.
+ // (require && range_value >= marker) || << Signal at previous loop
+ // (marker > 0 && !finished && elaped >= marker) << Signal at current loop
+ if( ( mProgressMarker > 0.0f ) && !finished && ( elapsedFactor >= markerFactor ) )
+ {
+ // The application should be notified by NotificationManager, in another thread
+ progressReached = true;
+ mProgressReachedSignalRequired = false;
+ }
+ else
+ {
+ if( mProgressReachedSignalRequired && ( edgeFactor >= markerFactor ) )
+ {
+ progressReached = true;
+ }
+ mProgressReachedSignalRequired = mProgressMarker > 0.0f;
+ }
+ }
+ else
+ {
+ // when it is not on looped state, only 1 case to send progress signal.
+ // (require && elaped >= marker)
+ if( mProgressReachedSignalRequired && ( elapsedFactor >= markerFactor ) )
+ {
+ // The application should be notified by NotificationManager, in another thread
+ progressReached = true;
+ mProgressReachedSignalRequired = false;
+ }
+ }