| 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 #ifndef CC_SCHEDULER_SCHEDULER_H_ | 5 #ifndef CC_SCHEDULER_SCHEDULER_H_ |
| 6 #define CC_SCHEDULER_SCHEDULER_H_ | 6 #define CC_SCHEDULER_SCHEDULER_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 bool ShouldRecoverImplLatency(const BeginFrameArgs& args, | 199 bool ShouldRecoverImplLatency(const BeginFrameArgs& args, |
| 200 bool can_activate_before_deadline) const; | 200 bool can_activate_before_deadline) const; |
| 201 bool CanBeginMainFrameAndActivateBeforeDeadline( | 201 bool CanBeginMainFrameAndActivateBeforeDeadline( |
| 202 const BeginFrameArgs& args, | 202 const BeginFrameArgs& args, |
| 203 base::TimeDelta bmf_to_activate_estimate, | 203 base::TimeDelta bmf_to_activate_estimate, |
| 204 base::TimeTicks now) const; | 204 base::TimeTicks now) const; |
| 205 void AdvanceCommitStateIfPossible(); | 205 void AdvanceCommitStateIfPossible(); |
| 206 bool IsBeginMainFrameSentOrStarted() const; | 206 bool IsBeginMainFrameSentOrStarted() const; |
| 207 void BeginImplFrameWithDeadline(const BeginFrameArgs& args); | 207 void BeginImplFrameWithDeadline(const BeginFrameArgs& args); |
| 208 void BeginImplFrameSynchronous(const BeginFrameArgs& args); | 208 void BeginImplFrameSynchronous(const BeginFrameArgs& args); |
| 209 void BeginImplFrame(const BeginFrameArgs& args); | 209 void BeginImplFrame(const BeginFrameArgs& args, base::TimeTicks now); |
| 210 void FinishImplFrame(); | 210 void FinishImplFrame(); |
| 211 enum BeginFrameResult { kBeginFrameSkipped, kBeginFrameFinished }; | 211 enum BeginFrameResult { kBeginFrameSkipped, kBeginFrameFinished }; |
| 212 void SendBeginFrameAck(const BeginFrameArgs& args, BeginFrameResult result); | 212 void SendBeginFrameAck(const BeginFrameArgs& args, BeginFrameResult result); |
| 213 void OnBeginImplFrameDeadline(); | 213 void OnBeginImplFrameDeadline(); |
| 214 void PollToAdvanceCommitState(); | 214 void PollToAdvanceCommitState(); |
| 215 | 215 |
| 216 bool IsInsideAction(SchedulerStateMachine::Action action) { | 216 bool IsInsideAction(SchedulerStateMachine::Action action) { |
| 217 return inside_action_ == action; | 217 return inside_action_ == action; |
| 218 } | 218 } |
| 219 | 219 |
| 220 base::WeakPtrFactory<Scheduler> weak_factory_; | 220 base::WeakPtrFactory<Scheduler> weak_factory_; |
| 221 | 221 |
| 222 DISALLOW_COPY_AND_ASSIGN(Scheduler); | 222 DISALLOW_COPY_AND_ASSIGN(Scheduler); |
| 223 }; | 223 }; |
| 224 | 224 |
| 225 } // namespace cc | 225 } // namespace cc |
| 226 | 226 |
| 227 #endif // CC_SCHEDULER_SCHEDULER_H_ | 227 #endif // CC_SCHEDULER_SCHEDULER_H_ |
| OLD | NEW |