static void qquickanimator_invalidate_jobs(QAbstractAnimationJob *job) { if (job->isRenderThreadJob()) { static_cast<QQuickAnimatorJob *>(job)->invalidate(); } else if (job->isGroup()) { QAnimationGroupJob *g = static_cast<QAnimationGroupJob *>(job); for (QAbstractAnimationJob *a = g->firstChild(); a; a = a->nextSibling()) qquickanimator_invalidate_jobs(a); } }
static void qquickanimator_sync_before_start(QAbstractAnimationJob *job) { if (job->isRenderThreadJob()) { static_cast<QQuickAnimatorJob *>(job)->preSync(); } else if (job->isGroup()) { QAnimationGroupJob *g = static_cast<QAnimationGroupJob *>(job); for (QAbstractAnimationJob *a = g->firstChild(); a; a = a->nextSibling()) qquickanimator_sync_before_start(a); } }
// All this is being executed on the GUI thread while the animator controller // is locked. void QQuickAnimatorController::start_helper(QAbstractAnimationJob *job) { if (job->isRenderThreadJob()) { QQuickAnimatorJob *j = static_cast<QQuickAnimatorJob *>(job); j->addAnimationChangeListener(this, QAbstractAnimationJob::StateChange); j->initialize(this); } else if (job->isGroup()) { QAnimationGroupJob *g = static_cast<QAnimationGroupJob *>(job); for (QAbstractAnimationJob *a = g->firstChild(); a; a = a->nextSibling()) start_helper(a); } }
static void qquick_syncback_helper(QAbstractAnimationJob *job) { if (job->isRenderThreadJob()) { QQuickAnimatorJob *a = static_cast<QQuickAnimatorJob *>(job); // Sync back only those jobs that actually have been running if (a->controller() && a->hasBeenRunning()) a->writeBack(); } else if (job->isGroup()) { QAnimationGroupJob *g = static_cast<QAnimationGroupJob *>(job); for (QAbstractAnimationJob *a = g->firstChild(); a; a = a->nextSibling()) qquick_syncback_helper(a); } }