(Vector) Fix frame drop bug 54/264754/1
authorHeeyong Song <heeyong.song@samsung.com>
Wed, 29 Sep 2021 07:36:07 +0000 (16:36 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Wed, 29 Sep 2021 07:36:10 +0000 (16:36 +0900)
Reset mDroppedFrames every frame

Change-Id: I366317fb732f37735245189f3297a61f769340f9

dali-toolkit/internal/visuals/animated-vector-image/vector-animation-task.cpp

index 91bdc42..86a37ab 100644 (file)
@@ -528,10 +528,11 @@ VectorAnimationTask::TimePoint VectorAnimationTask::CalculateNextFrameTime(bool
   // is casted to use the default duration.
   mNextFrameStartTime = std::chrono::time_point_cast<TimePoint::duration>(mNextFrameStartTime + std::chrono::microseconds(mFrameDurationMicroSeconds));
   auto current        = std::chrono::steady_clock::now();
   // is casted to use the default duration.
   mNextFrameStartTime = std::chrono::time_point_cast<TimePoint::duration>(mNextFrameStartTime + std::chrono::microseconds(mFrameDurationMicroSeconds));
   auto current        = std::chrono::steady_clock::now();
+  mDroppedFrames      = 0;
+
   if(renderNow)
   {
     mNextFrameStartTime = current;
   if(renderNow)
   {
     mNextFrameStartTime = current;
-    mDroppedFrames      = 0;
   }
   else if(mNextFrameStartTime < current)
   {
   }
   else if(mNextFrameStartTime < current)
   {