#include <dali/internal/common/memory-pool-object-allocator.h>
#include <dali/internal/render/common/performance-monitor.h>
#include <dali/public-api/math/math-utils.h>
+#include <dali/integration-api/debug.h>
+
namespace //Unnamed namespace
{
//Memory pool used to allocate new animations. Memory used by this pool will be released when shutting down DALi
void Animation::Play()
{
+ DALI_LOG_ERROR("Scene Graph Animation::Play: Before stable_sort\n");
+
// Sort according to end time with earlier end times coming first, if the end time is the same, then the animators are not moved
std::stable_sort( mAnimators.Begin(), mAnimators.End(), CompareAnimatorEndTimes );
+ DALI_LOG_ERROR("Scene Graph Animation::Play: After stable_sort\n");
+
mState = Playing;
if ( mSpeedFactor < 0.0f && mElapsedSeconds <= mPlayRange.x*mDurationSeconds )
mElapsedSeconds = mPlayRange.y * mDurationSeconds;
}
+ DALI_LOG_ERROR("Scene Graph Animation::Play: Before SetAnimatorsActive\n");
+
SetAnimatorsActive( true );
+ DALI_LOG_ERROR("Scene Graph Animation::Play: After SetAnimatorsActive\n");
+
mCurrentLoop = 0;
}
Vector2 playRangeSeconds = mPlayRange * mDurationSeconds;
- if( 0 == mLoopCount )
- {
- // loop forever
- WrapInPlayRange(mElapsedSeconds, playRangeSeconds);
-
- UpdateAnimators(bufferIndex, false, false );
-
- // don't increment mPlayedCount as event loop tracks this to indicate animation finished (end of all loops)
- }
- else if( mCurrentLoop < mLoopCount - 1) // '-1' here so last loop iteration uses play once below
+ if( 0 == mLoopCount || mCurrentLoop < mLoopCount - 1) // '-1' here so last loop iteration uses play once below
{
// looping
looped = (mState == Playing &&
if(looped)
{
- ++mCurrentLoop;
+ if( mLoopCount != 0 )
+ {
+ ++mCurrentLoop;
+ }
mProgressReachedSignalRequired = mProgressMarker > 0.0f;
// don't increment mPlayedCount until the finished final loop
}