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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 void SetWaitForReadyToDraw(); | 94 void SetWaitForReadyToDraw(); |
95 | 95 |
96 void SetMaxSwapsPending(int max); | 96 void SetMaxSwapsPending(int max); |
97 void DidSwapBuffers(); | 97 void DidSwapBuffers(); |
98 void DidSwapBuffersComplete(); | 98 void DidSwapBuffersComplete(); |
99 | 99 |
100 void SetImplLatencyTakesPriority(bool impl_latency_takes_priority); | 100 void SetImplLatencyTakesPriority(bool impl_latency_takes_priority); |
101 | 101 |
102 void NotifyReadyToCommit(); | 102 void NotifyReadyToCommit(); |
103 void BeginMainFrameAborted(CommitEarlyOutReason reason); | 103 void BeginMainFrameAborted(CommitEarlyOutReason reason); |
| 104 void DidCommit(); |
104 | 105 |
| 106 void WillPrepareTiles(); |
105 void DidPrepareTiles(); | 107 void DidPrepareTiles(); |
106 void DidLoseOutputSurface(); | 108 void DidLoseOutputSurface(); |
107 void DidCreateAndInitializeOutputSurface(); | 109 void DidCreateAndInitializeOutputSurface(); |
108 | 110 |
109 // Tests do not want to shut down until all possible BeginMainFrames have | 111 // Tests do not want to shut down until all possible BeginMainFrames have |
110 // occured to prevent flakiness. | 112 // occured to prevent flakiness. |
111 bool MainFrameForTestingWillHappen() const { | 113 bool MainFrameForTestingWillHappen() const { |
112 return state_machine_.CommitPending() || | 114 return state_machine_.CommitPending() || |
113 state_machine_.CouldSendBeginMainFrame(); | 115 state_machine_.CouldSendBeginMainFrame(); |
114 } | 116 } |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 SchedulerStateMachine::Action inside_action_; | 193 SchedulerStateMachine::Action inside_action_; |
192 | 194 |
193 private: | 195 private: |
194 void ScheduleBeginImplFrameDeadline(); | 196 void ScheduleBeginImplFrameDeadline(); |
195 void ScheduleBeginImplFrameDeadlineIfNeeded(); | 197 void ScheduleBeginImplFrameDeadlineIfNeeded(); |
196 void SetupNextBeginFrameIfNeeded(); | 198 void SetupNextBeginFrameIfNeeded(); |
197 void PostBeginRetroFrameIfNeeded(); | 199 void PostBeginRetroFrameIfNeeded(); |
198 void DrawAndSwapIfPossible(); | 200 void DrawAndSwapIfPossible(); |
199 void DrawAndSwapForced(); | 201 void DrawAndSwapForced(); |
200 void ProcessScheduledActions(); | 202 void ProcessScheduledActions(); |
| 203 void UpdateCompositorTimingHistoryRecordingEnabled(); |
201 bool CanCommitAndActivateBeforeDeadline() const; | 204 bool CanCommitAndActivateBeforeDeadline() const; |
202 void AdvanceCommitStateIfPossible(); | 205 void AdvanceCommitStateIfPossible(); |
203 bool IsBeginMainFrameSentOrStarted() const; | 206 bool IsBeginMainFrameSentOrStarted() const; |
204 void BeginRetroFrame(); | 207 void BeginRetroFrame(); |
205 void BeginImplFrameWithDeadline(const BeginFrameArgs& args); | 208 void BeginImplFrameWithDeadline(const BeginFrameArgs& args); |
206 void BeginImplFrameSynchronous(const BeginFrameArgs& args); | 209 void BeginImplFrameSynchronous(const BeginFrameArgs& args); |
207 void BeginImplFrame(const BeginFrameArgs& args); | 210 void BeginImplFrame(const BeginFrameArgs& args); |
208 void FinishImplFrame(); | 211 void FinishImplFrame(); |
209 void OnBeginImplFrameDeadline(); | 212 void OnBeginImplFrameDeadline(); |
210 void PollToAdvanceCommitState(); | 213 void PollToAdvanceCommitState(); |
(...skipping 15 matching lines...) Expand all Loading... |
226 } | 229 } |
227 | 230 |
228 base::WeakPtrFactory<Scheduler> weak_factory_; | 231 base::WeakPtrFactory<Scheduler> weak_factory_; |
229 | 232 |
230 DISALLOW_COPY_AND_ASSIGN(Scheduler); | 233 DISALLOW_COPY_AND_ASSIGN(Scheduler); |
231 }; | 234 }; |
232 | 235 |
233 } // namespace cc | 236 } // namespace cc |
234 | 237 |
235 #endif // CC_SCHEDULER_SCHEDULER_H_ | 238 #endif // CC_SCHEDULER_SCHEDULER_H_ |
OLD | NEW |