X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fanimated-vector-image%2Fvector-animation-task.cpp;h=c5978d66230034060039e22a5b9b50dda04ae754;hb=446d6a921c670c4c56aeaa4fec6415f6e6262b0a;hp=55968e10111f1a6907e938d5126c99c5482a45a4;hpb=2ffec8b73989656f70411ef1a99a721b6f86cd14;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/visuals/animated-vector-image/vector-animation-task.cpp b/dali-toolkit/internal/visuals/animated-vector-image/vector-animation-task.cpp index 55968e1..c5978d6 100644 --- a/dali-toolkit/internal/visuals/animated-vector-image/vector-animation-task.cpp +++ b/dali-toolkit/internal/visuals/animated-vector-image/vector-animation-task.cpp @@ -26,6 +26,7 @@ // INTERNAL INCLUDES #include #include +#include namespace Dali { @@ -52,7 +53,7 @@ VectorAnimationTask::VectorAnimationTask( VisualFactoryCache& factoryCache, cons : mUrl( url ), mVectorRenderer(), mAnimationData(), - mVectorAnimationThread( factoryCache.GetVectorAnimationThread() ), + mVectorAnimationThread( factoryCache.GetVectorAnimationManager().GetVectorAnimationThread() ), mConditionalWait(), mAnimationFinishedTrigger(), mPlayState( PlayState::STOPPED ), @@ -70,7 +71,6 @@ VectorAnimationTask::VectorAnimationTask( VisualFactoryCache& factoryCache, cons mAnimationDataIndex( 0 ), mLoopCount( LOOP_FOREVER ), mCurrentLoop( 0 ), - mResourceReady( false ), mForward( true ), mUpdateFrameNumber( false ), mNeedAnimationFinishedTrigger( true ), @@ -138,8 +138,6 @@ void VectorAnimationTask::SetSize( uint32_t width, uint32_t height ) mWidth = width; mHeight = height; - mResourceReady = false; - DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorAnimationTask::SetSize: width = %d, height = %d [%p]\n", width, height, this ); } } @@ -148,6 +146,7 @@ void VectorAnimationTask::PlayAnimation() { if( mPlayState != PlayState::PLAYING ) { + mNeedAnimationFinishedTrigger = true; mUpdateFrameNumber = false; mPlayState = PlayState::PLAYING; @@ -266,12 +265,10 @@ void VectorAnimationTask::SetPlayRange( const Property::Array& playRange ) if( mStartFrame > mCurrentFrame ) { mCurrentFrame = mStartFrame; - mResourceReady = false; } else if( mEndFrame < mCurrentFrame ) { mCurrentFrame = mEndFrame; - mResourceReady = false; } DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorAnimationTask::SetPlayRange: [%d, %d] [%p]\n", mStartFrame, mEndFrame, this ); @@ -302,7 +299,6 @@ void VectorAnimationTask::SetCurrentFrameNumber( uint32_t frameNumber ) { mCurrentFrame = frameNumber; mUpdateFrameNumber = false; - mResourceReady = false; DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorAnimationTask::SetCurrentFrameNumber: frame number = %d [%p]\n", mCurrentFrame, this ); } @@ -394,10 +390,7 @@ bool VectorAnimationTask::Rasterize() currentFrame = mCurrentFrame; - // Reset values - mResourceReady = true; mUpdateFrameNumber = true; - mNeedAnimationFinishedTrigger = true; if( mPlayState == PlayState::STOPPING ) { @@ -462,11 +455,6 @@ bool VectorAnimationTask::Rasterize() { DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorAnimationTask::Rasterize: Rendering failed. Try again later.[%d] [%p]\n", currentFrame, this ); mUpdateFrameNumber = false; - - if( !mResourceReady ) - { - mResourceReady = false; - } } }