+
+ auto timeToSleepUntil = currentFrameStartTime + std::chrono::nanoseconds( mFrameDurationNanoSeconds );
+
+#if defined(DEBUG_ENABLED)
+ auto sleepDuration = std::chrono::duration_cast< std::chrono::milliseconds >( timeToSleepUntil - std::chrono::system_clock::now() );
+
+ DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::Rasterize: [current = %d, sleep duration = %lld] [%p]\n", currentFrame, sleepDuration.count(), this );
+#endif
+
+ std::this_thread::sleep_until( timeToSleepUntil );
+}
+
+uint32_t VectorRasterizeThread::GetStoppedFrame( uint32_t startFrame, uint32_t endFrame, uint32_t currentFrame )
+{
+ uint32_t frame = currentFrame;
+
+ switch( mStopBehavior )
+ {
+ case DevelImageVisual::StopBehavior::FIRST_FRAME:
+ {
+ frame = startFrame;
+ break;
+ }
+ case DevelImageVisual::StopBehavior::LAST_FRAME:
+ {
+ if( mLoopingMode == DevelImageVisual::LoopingMode::AUTO_REVERSE )
+ {
+ frame = startFrame;
+ }
+ else
+ {
+ frame = endFrame;
+ }
+ break;
+ }
+ case DevelImageVisual::StopBehavior::CURRENT_FRAME:
+ {
+ frame = currentFrame;
+ break;
+ }
+ }
+
+ return frame;