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

Side by Side Diff: cc/frame_rate_controller.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/frame_rate_controller.h" 5 #include "cc/frame_rate_controller.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "cc/delay_based_time_source.h" 9 #include "cc/delay_based_time_source.h"
10 #include "cc/time_source.h" 10 #include "cc/time_source.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 } 146 }
147 147
148 base::TimeTicks FrameRateController::nextTickTime() 148 base::TimeTicks FrameRateController::nextTickTime()
149 { 149 {
150 if (m_isTimeSourceThrottling) 150 if (m_isTimeSourceThrottling)
151 return m_timeSource->nextTickTime(); 151 return m_timeSource->nextTickTime();
152 152
153 return base::TimeTicks(); 153 return base::TimeTicks();
154 } 154 }
155 155
156 base::TimeTicks FrameRateController::lastTickTime()
157 {
158 if (m_isTimeSourceThrottling)
159 return m_timeSource->lastTickTime();
160
161 return base::TimeTicks::Now();
162 }
163
156 } // namespace cc 164 } // namespace cc
OLDNEW
« no previous file with comments | « cc/frame_rate_controller.h ('k') | cc/layer_tree_host.h » ('j') | cc/layer_tree_host_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698