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

Side by Side Diff: cc/CCThreadedTest.cpp

Issue 10956006: Convert CC scheduler logic to use base::TimeTicks/Delta instead of doubles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/CCThreadedTest.h ('k') | cc/CCTimeSource.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 6
7 #include "CCThreadedTest.h" 7 #include "CCThreadedTest.h"
8 8
9 #include "CCActiveAnimation.h" 9 #include "CCActiveAnimation.h"
10 #include "CCAnimationTestCommon.h" 10 #include "CCAnimationTestCommon.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 m_testHooks->drawLayersOnCCThread(this); 113 m_testHooks->drawLayersOnCCThread(this);
114 } 114 }
115 115
116 void MockLayerTreeHostImpl::animateLayers(double monotonicTime, double wallClock Time) 116 void MockLayerTreeHostImpl::animateLayers(double monotonicTime, double wallClock Time)
117 { 117 {
118 m_testHooks->willAnimateLayers(this, monotonicTime); 118 m_testHooks->willAnimateLayers(this, monotonicTime);
119 CCLayerTreeHostImpl::animateLayers(monotonicTime, wallClockTime); 119 CCLayerTreeHostImpl::animateLayers(monotonicTime, wallClockTime);
120 m_testHooks->animateLayers(this, monotonicTime); 120 m_testHooks->animateLayers(this, monotonicTime);
121 } 121 }
122 122
123 double MockLayerTreeHostImpl::lowFrequencyAnimationInterval() const 123 base::TimeDelta MockLayerTreeHostImpl::lowFrequencyAnimationInterval() const
124 { 124 {
125 return 1.0 / 60; 125 return base::TimeDelta::FromMilliseconds(16);
126 } 126 }
127 127
128 MockLayerTreeHostImpl::MockLayerTreeHostImpl(TestHooks* testHooks, const CCLayer TreeSettings& settings, CCLayerTreeHostImplClient* client) 128 MockLayerTreeHostImpl::MockLayerTreeHostImpl(TestHooks* testHooks, const CCLayer TreeSettings& settings, CCLayerTreeHostImplClient* client)
129 : CCLayerTreeHostImpl(settings, client) 129 : CCLayerTreeHostImpl(settings, client)
130 , m_testHooks(testHooks) 130 , m_testHooks(testHooks)
131 { 131 {
132 } 132 }
133 133
134 // Adapts CCLayerTreeHost for test. Injects MockLayerTreeHostImpl. 134 // Adapts CCLayerTreeHost for test. Injects MockLayerTreeHostImpl.
135 class MockLayerTreeHost : public cc::CCLayerTreeHost { 135 class MockLayerTreeHost : public cc::CCLayerTreeHost {
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 if (m_timedOut) { 541 if (m_timedOut) {
542 FAIL() << "Test timed out"; 542 FAIL() << "Test timed out";
543 Platform::current()->compositorSupport()->shutdown(); 543 Platform::current()->compositorSupport()->shutdown();
544 return; 544 return;
545 } 545 }
546 afterTest(); 546 afterTest();
547 Platform::current()->compositorSupport()->shutdown(); 547 Platform::current()->compositorSupport()->shutdown();
548 } 548 }
549 549
550 } // namespace WebKitTests 550 } // namespace WebKitTests
OLDNEW
« no previous file with comments | « cc/CCThreadedTest.h ('k') | cc/CCTimeSource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698