summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2011-12-12 14:40:35 +1000
committerQt by Nokia <qt-info@nokia.com>2011-12-13 02:23:55 +0100
commit30a4d9bc99caae9e7254da18c95b5422e6917688 (patch)
tree0239780ac8f18924669afacf8d47278ec85b12d9 /src
parent08d378d9331c5be75087b1158a50076d12e14ea5 (diff)
Only call profiler callback once per animation tick.
Change-Id: I369afdf34ded2c6327ce36cdb80fab51bf89a1b5 Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/animation/qabstractanimation.cpp5
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;