diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2017-06-15 15:17:04 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2017-06-23 10:05:22 +0000 |
commit | 6f40494310dab964600375f04391f21b4eccdb44 (patch) | |
tree | a2dc6542a70672c3bf901a36723cff35089b6b11 /src/animation/backend/evaluateclipanimatorjob.cpp | |
parent | 11f092ce7c555814baeffc204f7fadc0f36fdcbb (diff) |
Add support for animation callbacks
Let QChannelMapping optionally specify a callback, which then gets
invoked either directly on a worker thread or the gui thread.
Change-Id: I871776f47cc921ceb254f9dc1a7b89ae5c5618d8
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/animation/backend/evaluateclipanimatorjob.cpp')
-rw-r--r-- | src/animation/backend/evaluateclipanimatorjob.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/animation/backend/evaluateclipanimatorjob.cpp b/src/animation/backend/evaluateclipanimatorjob.cpp index e89405d63..e9f3d1da8 100644 --- a/src/animation/backend/evaluateclipanimatorjob.cpp +++ b/src/animation/backend/evaluateclipanimatorjob.cpp @@ -84,6 +84,9 @@ void EvaluateClipAnimatorJob::run() // Send the property changes clipAnimator->sendPropertyChanges(changes); + // Trigger callbacks either on this thread or by notifying the gui thread. + const QVector<AnimationCallbackAndValue> callbacks = prepareCallbacks(clipAnimator->mappingData(), channelResults); + clipAnimator->sendCallbacks(callbacks); } } // namespace Animation |