Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Side by Side Diff: cc/scheduler/scheduler.h

Issue 1131633003: cc: Use multiple PrepareTiles approaches Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/scheduler/draw_result.h ('k') | cc/scheduler/scheduler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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();
240 void RetryBeginImplFrameWithDeadline();
241 void RetryBeginImplFrameDeadline();
239 void FinishImplFrame(); 242 void FinishImplFrame();
240 void OnBeginImplFrameDeadline(); 243 void OnBeginImplFrameDeadline();
241 void PollToAdvanceCommitState(); 244 void PollToAdvanceCommitState();
242 245
243 base::TimeDelta EstimatedParentDrawTime() { 246 base::TimeDelta EstimatedParentDrawTime() {
244 return estimated_parent_draw_time_; 247 return estimated_parent_draw_time_;
245 } 248 }
246 249
247 bool IsInsideAction(SchedulerStateMachine::Action action) { 250 bool IsInsideAction(SchedulerStateMachine::Action action) {
248 return inside_action_ == action; 251 return inside_action_ == action;
249 } 252 }
250 253
251 base::WeakPtrFactory<Scheduler> weak_factory_; 254 base::WeakPtrFactory<Scheduler> weak_factory_;
252 255
253 friend class SchedulerFrameSourcesConstructor; 256 friend class SchedulerFrameSourcesConstructor;
254 friend class TestSchedulerFrameSourcesConstructor; 257 friend class TestSchedulerFrameSourcesConstructor;
255 258
256 DISALLOW_COPY_AND_ASSIGN(Scheduler); 259 DISALLOW_COPY_AND_ASSIGN(Scheduler);
257 }; 260 };
258 261
259 } // namespace cc 262 } // namespace cc
260 263
261 #endif // CC_SCHEDULER_SCHEDULER_H_ 264 #endif // CC_SCHEDULER_SCHEDULER_H_
OLDNEW
« no previous file with comments | « cc/scheduler/draw_result.h ('k') | cc/scheduler/scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698