| 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/scheduler/delay_based_time_source.h" | 5 #include "cc/scheduler/delay_based_time_source.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "base/bind.h" |
| 10 #include "base/debug/trace_event.h" | 11 #include "base/debug/trace_event.h" |
| 12 #include "base/location.h" |
| 11 #include "base/logging.h" | 13 #include "base/logging.h" |
| 12 #include "base/single_thread_task_runner.h" | 14 #include "base/single_thread_task_runner.h" |
| 13 | 15 |
| 14 namespace cc { | 16 namespace cc { |
| 15 | 17 |
| 16 namespace { | 18 namespace { |
| 17 | 19 |
| 18 // kDoubleTickDivisor prevents ticks from running within the specified | 20 // kDoubleTickDivisor prevents ticks from running within the specified |
| 19 // fraction of an interval. This helps account for jitter in the timebase as | 21 // fraction of an interval. This helps account for jitter in the timebase as |
| 20 // well as quick timer reactivation. | 22 // well as quick timer reactivation. |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 task_runner_->PostDelayedTask(FROM_HERE, | 224 task_runner_->PostDelayedTask(FROM_HERE, |
| 223 base::Bind(&DelayBasedTimeSource::OnTimerFired, | 225 base::Bind(&DelayBasedTimeSource::OnTimerFired, |
| 224 weak_factory_.GetWeakPtr()), | 226 weak_factory_.GetWeakPtr()), |
| 225 delay); | 227 delay); |
| 226 | 228 |
| 227 next_parameters_.tick_target = new_tick_target; | 229 next_parameters_.tick_target = new_tick_target; |
| 228 current_parameters_ = next_parameters_; | 230 current_parameters_ = next_parameters_; |
| 229 } | 231 } |
| 230 | 232 |
| 231 } // namespace cc | 233 } // namespace cc |
| OLD | NEW |