return instance(true);
}
+void QUnifiedTimer::maybeUpdateAnimationsToCurrentTime()
+{
+ if (time.elapsed() - lastTick > 50)
+ updateAnimationTimers(driver->elapsed());
+}
+
void QUnifiedTimer::updateAnimationTimers(qint64 currentTick)
{
//setCurrentTime can get this called again while we're the for loop. At least with pauseAnimations
startAnimationPending = false;
//force timer to update, which prevents large deltas for our newly added animations
if (!animations.isEmpty())
- QUnifiedTimer::instance()->updateAnimationTimers(-1);
+ QUnifiedTimer::instance()->maybeUpdateAnimationsToCurrentTime();
//we transfer the waiting animations into the "really running" state
animations += animationsToStart;
bool canUninstallAnimationDriver(QAnimationDriver *driver);
void restart();
+ void maybeUpdateAnimationsToCurrentTime();
void updateAnimationTimers(qint64 currentTick);
//useful for profiling/debugging