| 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 <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 bool MainFrameForTestingWillHappen() const { | 113 bool MainFrameForTestingWillHappen() const { |
| 114 return state_machine_.CommitPending() || | 114 return state_machine_.CommitPending() || |
| 115 state_machine_.CouldSendBeginMainFrame(); | 115 state_machine_.CouldSendBeginMainFrame(); |
| 116 } | 116 } |
| 117 | 117 |
| 118 bool CommitPending() const { return state_machine_.CommitPending(); } | 118 bool CommitPending() const { return state_machine_.CommitPending(); } |
| 119 bool RedrawPending() const { return state_machine_.RedrawPending(); } | 119 bool RedrawPending() const { return state_machine_.RedrawPending(); } |
| 120 bool PrepareTilesPending() const { | 120 bool PrepareTilesPending() const { |
| 121 return state_machine_.PrepareTilesPending(); | 121 return state_machine_.PrepareTilesPending(); |
| 122 } | 122 } |
| 123 bool MainThreadIsInHighLatencyMode() const { | |
| 124 return state_machine_.MainThreadIsInHighLatencyMode(); | |
| 125 } | |
| 126 bool BeginImplFrameDeadlinePending() const { | 123 bool BeginImplFrameDeadlinePending() const { |
| 127 return !begin_impl_frame_deadline_task_.IsCancelled(); | 124 return !begin_impl_frame_deadline_task_.IsCancelled(); |
| 128 } | 125 } |
| 129 bool ImplLatencyTakesPriority() const { | 126 bool ImplLatencyTakesPriority() const { |
| 130 return state_machine_.impl_latency_takes_priority(); | 127 return state_machine_.impl_latency_takes_priority(); |
| 131 } | 128 } |
| 132 | 129 |
| 133 void NotifyBeginMainFrameStarted(); | 130 void NotifyBeginMainFrameStarted(); |
| 134 | 131 |
| 135 base::TimeTicks LastBeginImplFrameTime(); | 132 base::TimeTicks LastBeginImplFrameTime(); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 | 191 |
| 195 private: | 192 private: |
| 196 void ScheduleBeginImplFrameDeadline(); | 193 void ScheduleBeginImplFrameDeadline(); |
| 197 void ScheduleBeginImplFrameDeadlineIfNeeded(); | 194 void ScheduleBeginImplFrameDeadlineIfNeeded(); |
| 198 void SetupNextBeginFrameIfNeeded(); | 195 void SetupNextBeginFrameIfNeeded(); |
| 199 void PostBeginRetroFrameIfNeeded(); | 196 void PostBeginRetroFrameIfNeeded(); |
| 200 void DrawAndSwapIfPossible(); | 197 void DrawAndSwapIfPossible(); |
| 201 void DrawAndSwapForced(); | 198 void DrawAndSwapForced(); |
| 202 void ProcessScheduledActions(); | 199 void ProcessScheduledActions(); |
| 203 void UpdateCompositorTimingHistoryRecordingEnabled(); | 200 void UpdateCompositorTimingHistoryRecordingEnabled(); |
| 204 bool CanCommitAndActivateBeforeDeadline() const; | 201 bool ShouldRecoverMainLatency(const BeginFrameArgs& args) const; |
| 202 bool ShouldRecoverImplLatency(const BeginFrameArgs& args) const; |
| 203 bool CanCommitAndActivateBeforeDeadline(const BeginFrameArgs& args) const; |
| 205 void AdvanceCommitStateIfPossible(); | 204 void AdvanceCommitStateIfPossible(); |
| 206 bool IsBeginMainFrameSentOrStarted() const; | 205 bool IsBeginMainFrameSentOrStarted() const; |
| 207 void BeginRetroFrame(); | 206 void BeginRetroFrame(); |
| 208 void BeginImplFrameWithDeadline(const BeginFrameArgs& args); | 207 void BeginImplFrameWithDeadline(const BeginFrameArgs& args); |
| 209 void BeginImplFrameSynchronous(const BeginFrameArgs& args); | 208 void BeginImplFrameSynchronous(const BeginFrameArgs& args); |
| 210 void BeginImplFrame(const BeginFrameArgs& args); | 209 void BeginImplFrame(const BeginFrameArgs& args); |
| 211 void FinishImplFrame(); | 210 void FinishImplFrame(); |
| 212 void OnBeginImplFrameDeadline(); | 211 void OnBeginImplFrameDeadline(); |
| 213 void PollToAdvanceCommitState(); | 212 void PollToAdvanceCommitState(); |
| 214 | 213 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 229 } | 228 } |
| 230 | 229 |
| 231 base::WeakPtrFactory<Scheduler> weak_factory_; | 230 base::WeakPtrFactory<Scheduler> weak_factory_; |
| 232 | 231 |
| 233 DISALLOW_COPY_AND_ASSIGN(Scheduler); | 232 DISALLOW_COPY_AND_ASSIGN(Scheduler); |
| 234 }; | 233 }; |
| 235 | 234 |
| 236 } // namespace cc | 235 } // namespace cc |
| 237 | 236 |
| 238 #endif // CC_SCHEDULER_SCHEDULER_H_ | 237 #endif // CC_SCHEDULER_SCHEDULER_H_ |
| OLD | NEW |