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 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 } | 283 } |
284 | 284 |
285 std::string DelayBasedTimeSource::TypeString() const { | 285 std::string DelayBasedTimeSource::TypeString() const { |
286 return "DelayBasedTimeSource"; | 286 return "DelayBasedTimeSource"; |
287 } | 287 } |
288 | 288 |
289 std::string DelayBasedTimeSourceHighRes::TypeString() const { | 289 std::string DelayBasedTimeSourceHighRes::TypeString() const { |
290 return "DelayBasedTimeSourceHighRes"; | 290 return "DelayBasedTimeSourceHighRes"; |
291 } | 291 } |
292 | 292 |
293 void DelayBasedTimeSource::AsValueInto(base::debug::TracedValue* state) const { | 293 void DelayBasedTimeSource::AsValueInto( |
| 294 base::trace_event::TracedValue* state) const { |
294 state->SetString("type", TypeString()); | 295 state->SetString("type", TypeString()); |
295 state->SetDouble("last_tick_time_us", LastTickTime().ToInternalValue()); | 296 state->SetDouble("last_tick_time_us", LastTickTime().ToInternalValue()); |
296 state->SetDouble("next_tick_time_us", NextTickTime().ToInternalValue()); | 297 state->SetDouble("next_tick_time_us", NextTickTime().ToInternalValue()); |
297 | 298 |
298 state->BeginDictionary("current_parameters"); | 299 state->BeginDictionary("current_parameters"); |
299 state->SetDouble("interval_us", | 300 state->SetDouble("interval_us", |
300 current_parameters_.interval.InMicroseconds()); | 301 current_parameters_.interval.InMicroseconds()); |
301 state->SetDouble("tick_target_us", | 302 state->SetDouble("tick_target_us", |
302 current_parameters_.tick_target.ToInternalValue()); | 303 current_parameters_.tick_target.ToInternalValue()); |
303 state->EndDictionary(); | 304 state->EndDictionary(); |
304 | 305 |
305 state->BeginDictionary("next_parameters"); | 306 state->BeginDictionary("next_parameters"); |
306 state->SetDouble("interval_us", next_parameters_.interval.InMicroseconds()); | 307 state->SetDouble("interval_us", next_parameters_.interval.InMicroseconds()); |
307 state->SetDouble("tick_target_us", | 308 state->SetDouble("tick_target_us", |
308 next_parameters_.tick_target.ToInternalValue()); | 309 next_parameters_.tick_target.ToInternalValue()); |
309 state->EndDictionary(); | 310 state->EndDictionary(); |
310 | 311 |
311 state->SetBoolean("active", active_); | 312 state->SetBoolean("active", active_); |
312 } | 313 } |
313 | 314 |
314 } // namespace cc | 315 } // namespace cc |
OLD | NEW |