Only call profiler callback once per animation tick.
Change-Id: I369afdf34ded2c6327ce36cdb80fab51bf89a1b5 Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>bb10
parent
08d378d933
commit
30a4d9bc99
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue