+void VectorAnimationTask::SetAnimationData( const AnimationData& data )
+{
+ ConditionalWait::ScopedLock lock( mConditionalWait );
+
+ DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorAnimationTask::SetAnimationData [%p]\n", this );
+
+ if( data.resendFlag & VectorAnimationTask::RESEND_LOOP_COUNT )
+ {
+ SetLoopCount( data.loopCount );
+ }
+
+ if( data.resendFlag & VectorAnimationTask::RESEND_PLAY_RANGE )
+ {
+ SetPlayRange( data.playRange );
+ }
+
+ if( data.resendFlag & VectorAnimationTask::RESEND_STOP_BEHAVIOR )
+ {
+ SetStopBehavior( data.stopBehavior );
+ }
+
+ if( data.resendFlag & VectorAnimationTask::RESEND_LOOPING_MODE )
+ {
+ SetLoopingMode( data.loopingMode );
+ }
+
+ if( data.resendFlag & VectorAnimationTask::RESEND_CURRENT_FRAME )
+ {
+ SetCurrentFrameNumber( data.currentFrame );
+ }
+
+ if( data.resendFlag & VectorAnimationTask::RESEND_SIZE )
+ {
+ SetSize( data.width, data.height );
+ }
+
+ if( data.resendFlag & VectorAnimationTask::RESEND_PLAY_STATE )
+ {
+ if( data.playState == DevelImageVisual::PlayState::PLAYING )
+ {
+ PlayAnimation();
+ }
+ else if( data.playState == DevelImageVisual::PlayState::PAUSED )
+ {
+ PauseAnimation();
+ RenderFrame();
+ }
+ else if( data.playState == DevelImageVisual::PlayState::STOPPED )
+ {
+ StopAnimation();
+ }
+ }
+ else
+ {
+ if( mPlayState == PlayState::PAUSED || mPlayState == PlayState::STOPPED )
+ {
+ RenderFrame();
+ }
+ }
+}
+