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

Side by Side Diff: cc/scheduler.cc

Issue 12804006: cc: Save correct frame begin time to FrameRateCounter (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 9 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
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 "cc/scheduler.h" 5 #include "cc/scheduler.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 10
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 void Scheduler::setTimebaseAndInterval(base::TimeTicks timebase, base::TimeDelta interval) 143 void Scheduler::setTimebaseAndInterval(base::TimeTicks timebase, base::TimeDelta interval)
144 { 144 {
145 m_frameRateController->setTimebaseAndInterval(timebase, interval); 145 m_frameRateController->setTimebaseAndInterval(timebase, interval);
146 } 146 }
147 147
148 base::TimeTicks Scheduler::anticipatedDrawTime() 148 base::TimeTicks Scheduler::anticipatedDrawTime()
149 { 149 {
150 return m_frameRateController->nextTickTime(); 150 return m_frameRateController->nextTickTime();
151 } 151 }
152 152
153 base::TimeTicks Scheduler::lastDrawTime()
nduca 2013/03/13 05:53:28 Any reason not to call this lastVSyncTickTime or s
egraether 2013/03/13 22:26:01 Done.
154 {
155 return m_frameRateController->lastTickTime();
156 }
157
153 void Scheduler::vsyncTick(bool throttled) 158 void Scheduler::vsyncTick(bool throttled)
154 { 159 {
155 TRACE_EVENT1("cc", "Scheduler::vsyncTick", "throttled", throttled); 160 TRACE_EVENT1("cc", "Scheduler::vsyncTick", "throttled", throttled);
156 if (!throttled) 161 if (!throttled)
157 m_stateMachine.didEnterVSync(); 162 m_stateMachine.didEnterVSync();
158 processScheduledActions(); 163 processScheduledActions();
159 if (!throttled) 164 if (!throttled)
160 m_stateMachine.didLeaveVSync(); 165 m_stateMachine.didLeaveVSync();
161 } 166 }
162 167
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 } 215 }
211 action = m_stateMachine.nextAction(); 216 action = m_stateMachine.nextAction();
212 } 217 }
213 218
214 // Activate or deactivate the frame rate controller. 219 // Activate or deactivate the frame rate controller.
215 m_frameRateController->setActive(m_stateMachine.vsyncCallbackNeeded()); 220 m_frameRateController->setActive(m_stateMachine.vsyncCallbackNeeded());
216 m_client->didAnticipatedDrawTimeChange(m_frameRateController->nextTickTime() ); 221 m_client->didAnticipatedDrawTimeChange(m_frameRateController->nextTickTime() );
217 } 222 }
218 223
219 } // namespace cc 224 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698