Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(641)

Unified Diff: cc/layer_tree_host_unittest.cc

Issue 11191068: Remove WTF::currentTime() / WTF::monotonicallyIncreasingTime() uses from cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layer_tree_host_impl_unittest.cc ('k') | cc/proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_tree_host_unittest.cc
diff --git a/cc/layer_tree_host_unittest.cc b/cc/layer_tree_host_unittest.cc
index f85111ecdd146373670df900638efa2ebf96547d..030ee97b14bd78738bdbbd66878d340eb59ff3f2 100644
--- a/cc/layer_tree_host_unittest.cc
+++ b/cc/layer_tree_host_unittest.cc
@@ -504,7 +504,7 @@ public:
postSetNeedsCommitToMainThread();
}
- virtual void animate(double monotonicTime) OVERRIDE
+ virtual void animate(base::TimeTicks monotonicTime) OVERRIDE
{
// We skip the first commit becasue its the commit that populates the
// impl thread with a tree.
@@ -564,7 +564,7 @@ public:
postSetNeedsAnimateToMainThread();
}
- virtual void animate(double) OVERRIDE
+ virtual void animate(base::TimeTicks) OVERRIDE
{
if (!m_numAnimates) {
m_layerTreeHost->setNeedsAnimate();
@@ -595,7 +595,6 @@ public:
: m_numAnimates(0)
, m_receivedAnimationStartedNotification(false)
, m_startTime(0)
- , m_firstMonotonicTime(0)
{
}
@@ -604,7 +603,7 @@ public:
postAddInstantAnimationToMainThread();
}
- virtual void animateLayers(LayerTreeHostImpl* layerTreeHostImpl, double monotonicTime) OVERRIDE
+ virtual void animateLayers(LayerTreeHostImpl* layerTreeHostImpl, base::TimeTicks monotonicTime) OVERRIDE
{
if (!m_numAnimates) {
// The animation had zero duration so layerTreeHostImpl should no
@@ -615,8 +614,6 @@ public:
return;
}
EXPECT_LT(0, m_startTime);
- EXPECT_LT(0, m_firstMonotonicTime);
- EXPECT_NE(m_startTime, m_firstMonotonicTime);
EXPECT_TRUE(m_receivedAnimationStartedNotification);
endTest();
}
@@ -635,7 +632,7 @@ private:
int m_numAnimates;
bool m_receivedAnimationStartedNotification;
double m_startTime;
- double m_firstMonotonicTime;
+ base::TimeTicks m_firstMonotonicTime;
};
TEST_F(LayerTreeHostTestAddAnimation, runMultiThread)
@@ -661,7 +658,7 @@ public:
{
}
- virtual void animateLayers(LayerTreeHostImpl* layerTreeHostImpl, double monotonicTime) OVERRIDE
+ virtual void animateLayers(LayerTreeHostImpl* layerTreeHostImpl, base::TimeTicks monotonicTime) OVERRIDE
{
m_startedAnimating = true;
}
@@ -703,7 +700,7 @@ public:
// Use willAnimateLayers to set visible false before the animation runs and
// causes a commit, so we block the second visible animate in single-thread
// mode.
- virtual void willAnimateLayers(LayerTreeHostImpl* layerTreeHostImpl, double monotonicTime) OVERRIDE
+ virtual void willAnimateLayers(LayerTreeHostImpl* layerTreeHostImpl, base::TimeTicks monotonicTime) OVERRIDE
{
if (m_numAnimates < 2) {
if (!m_numAnimates) {
@@ -738,7 +735,7 @@ public:
postAddAnimationToMainThread();
}
- virtual void animateLayers(LayerTreeHostImpl* layerTreeHostImpl, double monotonicTime) OVERRIDE
+ virtual void animateLayers(LayerTreeHostImpl* layerTreeHostImpl, base::TimeTicks monotonicTime) OVERRIDE
{
const ActiveAnimation* animation = m_layerTreeHost->rootLayer()->layerAnimationController()->getActiveAnimation(0, ActiveAnimation::Opacity);
if (!animation)
@@ -811,8 +808,8 @@ public:
postAddAnimationToMainThread();
}
- // This is guaranteed to be called before LayerTreeHostImpl::animateLayers.
- virtual void willAnimateLayers(LayerTreeHostImpl* layerTreeHostImpl, double monotonicTime) OVERRIDE
+ // This is guaranteed to be called before CCLayerTreeHostImpl::animateLayers.
+ virtual void willAnimateLayers(LayerTreeHostImpl* layerTreeHostImpl, base::TimeTicks monotonicTime) OVERRIDE
{
m_layerTreeHostImpl = layerTreeHostImpl;
}
@@ -1072,7 +1069,7 @@ public:
void requestStartPageScaleAnimation()
{
- layerTreeHost()->startPageScaleAnimation(IntSize(), false, 1.25, 0);
+ layerTreeHost()->startPageScaleAnimation(IntSize(), false, 1.25, base::TimeDelta());
}
virtual void drawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE
@@ -3144,7 +3141,7 @@ public:
postSetNeedsCommitToMainThread();
}
- virtual void animate(double) OVERRIDE
+ virtual void animate(base::TimeTicks) OVERRIDE
{
m_layerTreeHost->setNeedsAnimate();
}
« no previous file with comments | « cc/layer_tree_host_impl_unittest.cc ('k') | cc/proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698