diff options
author | Wieland Hagen <wieland.hagen@kdab.com> | 2017-08-02 22:50:58 +0200 |
---|---|---|
committer | Wieland Hagen <wieland.hagen@kdab.com> | 2017-09-08 11:53:24 +0000 |
commit | cef1c7fe3c650f6fad4760230d3cf7052ed70253 (patch) | |
tree | 7275017003db416aa57dc253cb727ce2962c34c1 /src/animation/backend/handler_p.h | |
parent | cc815a6146c9397539d5a639f29004a5aaeb6a5b (diff) |
Re-build Blend-Trees when Clips have been loaded
We need to notify the BlendedClipAnimators, when any of the
clips it depends on have been loaded. So we register each
animator at the clips that it depends on, mark the animator
dirty when the clip has been loaded and thus trigger a re-run
of the BuildBlendTreesJob.
Make sure to guard accesses to the Handler via mutexes, because
backend objects can be marked dirty from various threads.
Task-number: QTBUG-61941
Change-Id: I4890d0d76d3118538537252f920d9477bed8f934
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/animation/backend/handler_p.h')
-rw-r--r-- | src/animation/backend/handler_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/animation/backend/handler_p.h b/src/animation/backend/handler_p.h index 97adfdc13..467cd3a0e 100644 --- a/src/animation/backend/handler_p.h +++ b/src/animation/backend/handler_p.h @@ -53,6 +53,7 @@ #include <Qt3DCore/qaspectjob.h> #include <Qt3DCore/qnodeid.h> #include <QtCore/qscopedpointer.h> +#include <QtCore/qmutex.h> QT_BEGIN_NAMESPACE @@ -120,6 +121,7 @@ public: void cleanupHandleList(QVector<HBlendedClipAnimator> *animators); private: + QMutex m_mutex; QScopedPointer<AnimationClipLoaderManager> m_animationClipLoaderManager; QScopedPointer<ClipAnimatorManager> m_clipAnimatorManager; QScopedPointer<BlendedClipAnimatorManager> m_blendedClipAnimatorManager; |