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

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

Issue 218633010: cc: Handle retroactive BeginFrames in the Scheduler. (Closed) Base URL: http://git.chromium.org/chromium/src.git@compositorVsyncDisable
Patch Set: fix comment typo Created 6 years, 8 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/scheduler.cc ('k') | cc/scheduler/scheduler_state_machine.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_STATE_MACHINE_H_ 5 #ifndef CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_
6 #define CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ 6 #define CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 scoped_ptr<base::Value> AsValue() const; 117 scoped_ptr<base::Value> AsValue() const;
118 118
119 Action NextAction() const; 119 Action NextAction() const;
120 void UpdateState(Action action); 120 void UpdateState(Action action);
121 121
122 void CheckInvariants(); 122 void CheckInvariants();
123 123
124 // Indicates whether the impl thread needs a BeginImplFrame callback in order 124 // Indicates whether the impl thread needs a BeginImplFrame callback in order
125 // to make progress. 125 // to make progress.
126 bool BeginImplFrameNeeded() const; 126 bool BeginFrameNeeded() const;
127 127
128 // Indicates that we need to independently poll for new state and actions 128 // Indicates that we need to independently poll for new state and actions
129 // because we can't expect a BeginImplFrame. This is mostly used to avoid 129 // because we can't expect a BeginImplFrame. This is mostly used to avoid
130 // drawing repeat frames with the synchronous compositor without dropping 130 // drawing repeat frames with the synchronous compositor without dropping
131 // necessary actions on the floor. 131 // necessary actions on the floor.
132 bool ShouldPollForAnticipatedDrawTriggers() const; 132 bool ShouldPollForAnticipatedDrawTriggers() const;
133 133
134 // Indicates that the system has entered and left a BeginImplFrame callback. 134 // Indicates that the system has entered and left a BeginImplFrame callback.
135 // The scheduler will not draw more than once in a given BeginImplFrame 135 // The scheduler will not draw more than once in a given BeginImplFrame
136 // callback nor send more than one BeginMainFrame message. 136 // callback nor send more than one BeginMainFrame message.
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 } 223 }
224 224
225 void DidManageTiles(); 225 void DidManageTiles();
226 void DidLoseOutputSurface(); 226 void DidLoseOutputSurface();
227 void DidCreateAndInitializeOutputSurface(); 227 void DidCreateAndInitializeOutputSurface();
228 bool HasInitializedOutputSurface() const; 228 bool HasInitializedOutputSurface() const;
229 229
230 // True if we need to abort draws to make forward progress. 230 // True if we need to abort draws to make forward progress.
231 bool PendingDrawsShouldBeAborted() const; 231 bool PendingDrawsShouldBeAborted() const;
232 232
233 bool SupportsProactiveBeginImplFrame() const; 233 bool SupportsProactiveBeginFrame() const;
234 234
235 void SetContinuousPainting(bool continuous_painting) { 235 void SetContinuousPainting(bool continuous_painting) {
236 continuous_painting_ = continuous_painting; 236 continuous_painting_ = continuous_painting;
237 } 237 }
238 238
239 protected: 239 protected:
240 bool BeginImplFrameNeededToDraw() const; 240 bool BeginFrameNeededToDraw() const;
241 bool ProactiveBeginImplFrameWanted() const; 241 bool ProactiveBeginFrameWanted() const;
242 242
243 // True if we need to force activations to make forward progress. 243 // True if we need to force activations to make forward progress.
244 bool PendingActivationsShouldBeForced() const; 244 bool PendingActivationsShouldBeForced() const;
245 245
246 bool ShouldBeginOutputSurfaceCreation() const; 246 bool ShouldBeginOutputSurfaceCreation() const;
247 bool ShouldDrawForced() const; 247 bool ShouldDrawForced() const;
248 bool ShouldDraw() const; 248 bool ShouldDraw() const;
249 bool ShouldActivatePendingTree() const; 249 bool ShouldActivatePendingTree() const;
250 bool ShouldUpdateVisibleTiles() const; 250 bool ShouldUpdateVisibleTiles() const;
251 bool ShouldSendBeginMainFrame() const; 251 bool ShouldSendBeginMainFrame() const;
(...skipping 12 matching lines...) Expand all
264 void UpdateStateOnManageTiles(); 264 void UpdateStateOnManageTiles();
265 265
266 const SchedulerSettings settings_; 266 const SchedulerSettings settings_;
267 267
268 OutputSurfaceState output_surface_state_; 268 OutputSurfaceState output_surface_state_;
269 BeginImplFrameState begin_impl_frame_state_; 269 BeginImplFrameState begin_impl_frame_state_;
270 CommitState commit_state_; 270 CommitState commit_state_;
271 ForcedRedrawOnTimeoutState forced_redraw_state_; 271 ForcedRedrawOnTimeoutState forced_redraw_state_;
272 SynchronousReadbackState readback_state_; 272 SynchronousReadbackState readback_state_;
273 273
274 BeginFrameArgs last_begin_impl_frame_args_; 274 BeginFrameArgs begin_impl_frame_args_;
275 275
276 int commit_count_; 276 int commit_count_;
277 int current_frame_number_; 277 int current_frame_number_;
278 int last_frame_number_swap_performed_; 278 int last_frame_number_swap_performed_;
279 int last_frame_number_begin_main_frame_sent_; 279 int last_frame_number_begin_main_frame_sent_;
280 int last_frame_number_update_visible_tiles_was_called_; 280 int last_frame_number_update_visible_tiles_was_called_;
281 281
282 // manage_tiles_funnel_ is "filled" each time ManageTiles is called 282 // manage_tiles_funnel_ is "filled" each time ManageTiles is called
283 // and "drained" on each BeginImplFrame. If the funnel gets too full, 283 // and "drained" on each BeginImplFrame. If the funnel gets too full,
284 // we start throttling ACTION_MANAGE_TILES such that we average one 284 // we start throttling ACTION_MANAGE_TILES such that we average one
(...skipping 19 matching lines...) Expand all
304 bool continuous_painting_; 304 bool continuous_painting_;
305 bool needs_back_to_back_readback_; 305 bool needs_back_to_back_readback_;
306 306
307 private: 307 private:
308 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); 308 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine);
309 }; 309 };
310 310
311 } // namespace cc 311 } // namespace cc
312 312
313 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ 313 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler.cc ('k') | cc/scheduler/scheduler_state_machine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698