aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/util/qquickanimatorjob_p.h
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@digia.com>2013-11-01 15:49:33 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-06 19:19:34 +0100
commit63e0ffb32a4a432ed57f31388fabff89b05cb8cc (patch)
tree8c4927b577bb47789b85368d55ebee2544938352 /src/quick/util/qquickanimatorjob_p.h
parente0458defdfadeb3a1fb92eb12b14fce9191fe1ee (diff)
Refactored Animator internals
Change the design from posting events for starting and stopping to use the scene graph's existing 'sync' point. This gives much higher predictability and makes both ownership and cleanup cleaner and also reduces intermediate states while events are waiting to be delivered. Task-number: QTBUG-34137 Change-Id: I069ac22acbddaa47925b8172ba98ac340fe9bf8d Reviewed-by: Michael Brasser <michael.brasser@live.com>
Diffstat (limited to 'src/quick/util/qquickanimatorjob_p.h')
-rw-r--r--src/quick/util/qquickanimatorjob_p.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/quick/util/qquickanimatorjob_p.h b/src/quick/util/qquickanimatorjob_p.h
index bc9c65c347..8aae121106 100644
--- a/src/quick/util/qquickanimatorjob_p.h
+++ b/src/quick/util/qquickanimatorjob_p.h
@@ -63,7 +63,7 @@ class QQuickShaderEffectNode;
class QSGOpacityNode;
-class Q_QUICK_PRIVATE_EXPORT QQuickAnimatorProxyJob : public QObject, public QAbstractAnimationJob, public QAnimationJobChangeListener
+class Q_QUICK_PRIVATE_EXPORT QQuickAnimatorProxyJob : public QObject, public QAbstractAnimationJob
{
Q_OBJECT
@@ -73,7 +73,10 @@ public:
int duration() const { return m_duration; }
- virtual void animationFinished(QAbstractAnimationJob *);
+ QAbstractAnimationJob *job() const { return m_job; }
+
+ void startedByController();
+ void controllerWasDeleted();
protected:
bool event(QEvent *);
@@ -91,7 +94,6 @@ private:
void readyToAnimate();
void setWindow(QQuickWindow *window);
static QObject *findAnimationContext(QQuickAbstractAnimation *);
- void startOnRenderThread();
QQuickAnimatorController *m_controller;
QQuickAbstractAnimation *m_animation;
@@ -134,6 +136,7 @@ public:
bool isUniform() const { return m_isUniform; }
bool hasBeenRunning() const { return m_hasBeenRunning; }
+ void setHasBeenRunning(bool has) { m_hasBeenRunning = has; }
qreal value() const;
@@ -141,7 +144,6 @@ public:
protected:
QQuickAnimatorJob();
- void updateState(State newState, State oldState);
QQuickItem *m_target;
QQuickAnimatorController *m_controller;
@@ -180,8 +182,6 @@ public:
{
}
- ~Helper();
-
void sync();
void apply();