| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |