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