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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 void CommitVSyncParameters(base::TimeTicks timebase, | 101 void CommitVSyncParameters(base::TimeTicks timebase, |
102 base::TimeDelta interval); | 102 base::TimeDelta interval); |
103 void SetEstimatedParentDrawTime(base::TimeDelta draw_time); | 103 void SetEstimatedParentDrawTime(base::TimeDelta draw_time); |
104 | 104 |
105 void SetCanStart(); | 105 void SetCanStart(); |
106 | 106 |
107 void SetVisible(bool visible); | 107 void SetVisible(bool visible); |
108 void SetCanDraw(bool can_draw); | 108 void SetCanDraw(bool can_draw); |
109 void NotifyReadyToActivate(); | 109 void NotifyReadyToActivate(); |
110 void NotifyReadyToDraw(); | 110 void NotifyReadyToDraw(); |
| 111 void SetRequiresHighResToDraw(bool required); |
111 void SetThrottleFrameProduction(bool throttle); | 112 void SetThrottleFrameProduction(bool throttle); |
112 | 113 |
113 void SetNeedsCommit(); | 114 void SetNeedsCommit(); |
114 | 115 |
115 void SetNeedsRedraw(); | 116 void SetNeedsRedraw(); |
116 | 117 |
117 void SetNeedsAnimate(); | 118 void SetNeedsAnimate(); |
118 | 119 |
119 void SetNeedsPrepareTiles(); | 120 void SetNeedsPrepareTiles(bool for_commit); |
120 | 121 |
121 void SetWaitForReadyToDraw(); | 122 void SetWaitForReadyToDraw(); |
122 | 123 |
123 void SetMaxSwapsPending(int max); | 124 void SetMaxSwapsPending(int max); |
124 void DidSwapBuffers(); | 125 void DidSwapBuffers(); |
125 void DidSwapBuffersComplete(); | 126 void DidSwapBuffersComplete(); |
126 | 127 |
127 void SetImplLatencyTakesPriority(bool impl_latency_takes_priority); | 128 void SetImplLatencyTakesPriority(bool impl_latency_takes_priority); |
128 | 129 |
129 void NotifyReadyToCommit(); | 130 void NotifyReadyToCommit(); |
130 void BeginMainFrameAborted(CommitEarlyOutReason reason); | 131 void BeginMainFrameAborted(CommitEarlyOutReason reason); |
131 | 132 |
132 void DidPrepareTiles(); | |
133 void DidLoseOutputSurface(); | 133 void DidLoseOutputSurface(); |
134 void DidCreateAndInitializeOutputSurface(); | 134 void DidCreateAndInitializeOutputSurface(); |
135 | 135 |
136 // Tests do not want to shut down until all possible BeginMainFrames have | 136 // Tests do not want to shut down until all possible BeginMainFrames have |
137 // occured to prevent flakiness. | 137 // occured to prevent flakiness. |
138 bool MainFrameForTestingWillHappen() const { | 138 bool MainFrameForTestingWillHappen() const { |
139 return state_machine_.CommitPending() || | 139 return state_machine_.CommitPending() || |
140 state_machine_.CouldSendBeginMainFrame(); | 140 state_machine_.CouldSendBeginMainFrame(); |
141 } | 141 } |
142 | 142 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 bool inside_process_scheduled_actions_; | 221 bool inside_process_scheduled_actions_; |
222 SchedulerStateMachine::Action inside_action_; | 222 SchedulerStateMachine::Action inside_action_; |
223 | 223 |
224 private: | 224 private: |
225 void ScheduleBeginImplFrameDeadline(); | 225 void ScheduleBeginImplFrameDeadline(); |
226 void ScheduleBeginImplFrameDeadlineIfNeeded(); | 226 void ScheduleBeginImplFrameDeadlineIfNeeded(); |
227 void SetupNextBeginFrameIfNeeded(); | 227 void SetupNextBeginFrameIfNeeded(); |
228 void PostBeginRetroFrameIfNeeded(); | 228 void PostBeginRetroFrameIfNeeded(); |
229 void SetupPollingMechanisms(); | 229 void SetupPollingMechanisms(); |
230 void DrawAndSwapIfPossible(); | 230 void DrawAndSwapIfPossible(); |
| 231 void DrawAndSwapForced(); |
231 void ProcessScheduledActions(); | 232 void ProcessScheduledActions(); |
232 bool CanCommitAndActivateBeforeDeadline() const; | 233 bool CanCommitAndActivateBeforeDeadline() const; |
233 void AdvanceCommitStateIfPossible(); | 234 void AdvanceCommitStateIfPossible(); |
234 bool IsBeginMainFrameSentOrStarted() const; | 235 bool IsBeginMainFrameSentOrStarted() const; |
235 void BeginRetroFrame(); | 236 void BeginRetroFrame(); |
236 void BeginImplFrameWithDeadline(const BeginFrameArgs& args); | 237 void BeginImplFrameWithDeadline(const BeginFrameArgs& args); |
237 void BeginImplFrameSynchronous(const BeginFrameArgs& args); | 238 void BeginImplFrameSynchronous(const BeginFrameArgs& args); |
238 void BeginImplFrame(); | 239 void BeginImplFrame(); |
239 void FinishImplFrame(); | 240 void FinishImplFrame(); |
240 void OnBeginImplFrameDeadline(); | 241 void OnBeginImplFrameDeadline(); |
(...skipping 11 matching lines...) Expand all Loading... |
252 | 253 |
253 friend class SchedulerFrameSourcesConstructor; | 254 friend class SchedulerFrameSourcesConstructor; |
254 friend class TestSchedulerFrameSourcesConstructor; | 255 friend class TestSchedulerFrameSourcesConstructor; |
255 | 256 |
256 DISALLOW_COPY_AND_ASSIGN(Scheduler); | 257 DISALLOW_COPY_AND_ASSIGN(Scheduler); |
257 }; | 258 }; |
258 | 259 |
259 } // namespace cc | 260 } // namespace cc |
260 | 261 |
261 #endif // CC_SCHEDULER_SCHEDULER_H_ | 262 #endif // CC_SCHEDULER_SCHEDULER_H_ |
OLD | NEW |