summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@jollamobile.com>2014-08-20 12:07:19 +0200
committerGunnar Sletta <gunnar.sletta@jollamobile.com>2014-08-20 18:53:27 +0200
commit3eb466a75d1d243366fb46c8e9488d5ddf7e6b17 (patch)
treeb30f192cd4719ac34cd4d6b24ea1d1a9357a414a
parentee0237e968ac5335dbd3785882b94a67ea2dceed (diff)
Remove the use of QAnimationDriver::startTime().
The implementation in 5.4 doesn't need it anymore. Change-Id: Icef27eb697a48d4bc6af909e563921f3a680adc0 Reviewed-by: Michael Brasser <michael.brasser@live.com>
-rw-r--r--customcontext/animation/animationdriver.cpp18
-rw-r--r--customcontext/animation/swaplisteninganimationdriver.cpp6
2 files changed, 14 insertions, 10 deletions
diff --git a/customcontext/animation/animationdriver.cpp b/customcontext/animation/animationdriver.cpp
index f14b04f..07a8f3f 100644
--- a/customcontext/animation/animationdriver.cpp
+++ b/customcontext/animation/animationdriver.cpp
@@ -78,10 +78,14 @@ void AnimationDriver::maybeUpdateDelta()
qint64 AnimationDriver::elapsed() const
{
- if (!isRunning() || m_vsyncDelta < 0 || m_timeMode == CurrentTime)
- return startTime() + m_animationTimer.elapsed();
+ if (!isRunning()) {
+ // This is strictly a bug, but be graceful about it...
+ return 0;
+ }
+ if (m_vsyncDelta < 0 || m_timeMode == CurrentTime)
+ return m_animationTimer.elapsed();
else
- return startTime() + m_animationTime;
+ return m_animationTime;
}
void AnimationDriver::start()
@@ -99,7 +103,7 @@ void AnimationDriver::advance()
if (m_vsyncDelta < 0) {
m_animationTime = currentTime;
- QAnimationDriver::advanceAnimation(startTime() + m_animationTime);
+ QAnimationDriver::advanceAnimation(m_animationTime);
return;
}
@@ -148,11 +152,11 @@ void AnimationDriver::advance()
m_animationTime = currentTime;
}
-// printf(" - (%s) advancing by: startTime=%d, animTime=%d, current=%d %s\n",
+// printf(" - (%s) advancing by: animTime=%d, current=%d %s\n",
// m_timeMode == PredictedTime ? "pre" : "cur",
-// (int) startTime(), (int) m_animationTime, (int) currentTime, badFrame ? "*bad*" : "");
+// (int) m_animationTime, (int) currentTime, badFrame ? "*bad*" : "");
- QAnimationDriver::advanceAnimation(startTime() + m_animationTime);
+ QAnimationDriver::advanceAnimation(m_animationTime);
}
}
diff --git a/customcontext/animation/swaplisteninganimationdriver.cpp b/customcontext/animation/swaplisteninganimationdriver.cpp
index a740ae8..4d3d924 100644
--- a/customcontext/animation/swaplisteninganimationdriver.cpp
+++ b/customcontext/animation/swaplisteninganimationdriver.cpp
@@ -97,9 +97,9 @@ void SwapListeningAnimationDriver::start()
qint64 SwapListeningAnimationDriver::elapsed() const
{
if (!isRunning() || m_stableVsync <= 0)
- return startTime() + m_timer.elapsed();
+ return m_timer.elapsed();
else
- return startTime() + m_currentTime;
+ return m_currentTime;
}
void SwapListeningAnimationDriver::advance()
@@ -116,5 +116,5 @@ void SwapListeningAnimationDriver::advance()
m_currentTime = m_timer.elapsed();
}
- QAnimationDriver::advanceAnimation(startTime() + m_currentTime);
+ QAnimationDriver::advanceAnimation(m_currentTime);
}