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

Side by Side Diff: cc/CCFrameRateController.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/CCFrameRateController.h ('k') | cc/CCFrameRateControllerTest.cpp » ('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 "CCFrameRateController.h" 7 #include "CCFrameRateController.h"
8 8
9 #include "CCDelayBasedTimeSource.h" 9 #include "CCDelayBasedTimeSource.h"
10 #include "CCTimeSource.h" 10 #include "CCTimeSource.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 m_manualTicker->stop(); 83 m_manualTicker->stop();
84 } 84 }
85 } 85 }
86 86
87 void CCFrameRateController::setMaxFramesPending(int maxFramesPending) 87 void CCFrameRateController::setMaxFramesPending(int maxFramesPending)
88 { 88 {
89 ASSERT(maxFramesPending > 0); 89 ASSERT(maxFramesPending > 0);
90 m_maxFramesPending = maxFramesPending; 90 m_maxFramesPending = maxFramesPending;
91 } 91 }
92 92
93 void CCFrameRateController::setTimebaseAndInterval(double timebase, double inter valSeconds) 93 void CCFrameRateController::setTimebaseAndInterval(base::TimeTicks timebase, bas e::TimeDelta interval)
94 { 94 {
95 if (m_isTimeSourceThrottling) 95 if (m_isTimeSourceThrottling)
96 m_timeSource->setTimebaseAndInterval(timebase, intervalSeconds); 96 m_timeSource->setTimebaseAndInterval(timebase, interval);
97 } 97 }
98 98
99 void CCFrameRateController::setSwapBuffersCompleteSupported(bool supported) 99 void CCFrameRateController::setSwapBuffersCompleteSupported(bool supported)
100 { 100 {
101 m_swapBuffersCompleteSupported = supported; 101 m_swapBuffersCompleteSupported = supported;
102 } 102 }
103 103
104 void CCFrameRateController::onTimerTick() 104 void CCFrameRateController::onTimerTick()
105 { 105 {
106 ASSERT(m_active); 106 ASSERT(m_active);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 m_numFramesPending--; 144 m_numFramesPending--;
145 if (!m_isTimeSourceThrottling) 145 if (!m_isTimeSourceThrottling)
146 postManualTick(); 146 postManualTick();
147 } 147 }
148 148
149 void CCFrameRateController::didAbortAllPendingFrames() 149 void CCFrameRateController::didAbortAllPendingFrames()
150 { 150 {
151 m_numFramesPending = 0; 151 m_numFramesPending = 0;
152 } 152 }
153 153
154 double CCFrameRateController::nextTickTimeIfActivated() 154 base::TimeTicks CCFrameRateController::nextTickTimeIfActivated()
155 { 155 {
156 if (m_isTimeSourceThrottling) 156 if (m_isTimeSourceThrottling)
157 return m_timeSource->nextTickTimeIfActivated(); 157 return m_timeSource->nextTickTimeIfActivated();
158 158
159 return monotonicallyIncreasingTime(); 159 return base::TimeTicks::Now();
160 } 160 }
161 161
162 } 162 }
OLDNEW
« no previous file with comments | « cc/CCFrameRateController.h ('k') | cc/CCFrameRateControllerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698