diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2011-12-12 14:40:35 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-12-13 02:23:55 +0100 |
commit | 30a4d9bc99caae9e7254da18c95b5422e6917688 (patch) | |
tree | 0239780ac8f18924669afacf8d47278ec85b12d9 /src/corelib/animation/qabstractanimation.cpp | |
parent | 08d378d9331c5be75087b1158a50076d12e14ea5 (diff) |
Only call profiler callback once per animation tick.
Change-Id: I369afdf34ded2c6327ce36cdb80fab51bf89a1b5
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
Diffstat (limited to 'src/corelib/animation/qabstractanimation.cpp')
-rw-r--r-- | src/corelib/animation/qabstractanimation.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp index 1d0715e6d9..11113138a7 100644 --- a/src/corelib/animation/qabstractanimation.cpp +++ b/src/corelib/animation/qabstractanimation.cpp @@ -230,14 +230,13 @@ void QUnifiedTimer::updateAnimationsTime(qint64 timeStep) //when the CPU load is high if (delta) { insideTick = true; + if (profilerCallback) + profilerCallback(delta); for (currentAnimationIdx = 0; currentAnimationIdx < animations.count(); ++currentAnimationIdx) { QAbstractAnimation *animation = animations.at(currentAnimationIdx); int elapsed = QAbstractAnimationPrivate::get(animation)->totalCurrentTime + (animation->direction() == QAbstractAnimation::Forward ? delta : -delta); animation->setCurrentTime(elapsed); - - if (profilerCallback) - profilerCallback(delta); } insideTick = false; currentAnimationIdx = 0; |