| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/begin_frame_tracker.h" | 5 #include "cc/scheduler/begin_frame_tracker.h" |
| 6 | 6 |
| 7 namespace cc { | 7 namespace cc { |
| 8 | 8 |
| 9 BeginFrameTracker::BeginFrameTracker(const tracked_objects::Location& location) | 9 BeginFrameTracker::BeginFrameTracker(const tracked_objects::Location& location) |
| 10 : location_(location), | 10 : location_(location), |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 (deadline - frame_time).InMillisecondsF()); | 105 (deadline - frame_time).InMillisecondsF()); |
| 106 state->SetDouble("4_now", (now - base::TimeTicks()).InMillisecondsF()); | 106 state->SetDouble("4_now", (now - base::TimeTicks()).InMillisecondsF()); |
| 107 state->SetDouble("5_frame_time", | 107 state->SetDouble("5_frame_time", |
| 108 (frame_time - base::TimeTicks()).InMillisecondsF()); | 108 (frame_time - base::TimeTicks()).InMillisecondsF()); |
| 109 state->SetDouble("6_deadline", | 109 state->SetDouble("6_deadline", |
| 110 (deadline - base::TimeTicks()).InMillisecondsF()); | 110 (deadline - base::TimeTicks()).InMillisecondsF()); |
| 111 state->EndDictionary(); | 111 state->EndDictionary(); |
| 112 } | 112 } |
| 113 | 113 |
| 114 const BeginFrameArgs& BeginFrameTracker::DangerousMethodCurrentOrLast() const { | 114 const BeginFrameArgs& BeginFrameTracker::DangerousMethodCurrentOrLast() const { |
| 115 if (!HasFinished()) { | 115 return current_args_; |
| 116 return Current(); | |
| 117 } else { | |
| 118 return Last(); | |
| 119 } | |
| 120 } | 116 } |
| 121 | 117 |
| 122 } // namespace cc | 118 } // namespace cc |
| OLD | NEW |