| 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_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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 void AsValueInto(base::trace_event::TracedValue* dict, | 118 void AsValueInto(base::trace_event::TracedValue* dict, |
| 119 base::TimeTicks now) const; | 119 base::TimeTicks now) const; |
| 120 | 120 |
| 121 Action NextAction() const; | 121 Action NextAction() const; |
| 122 void UpdateState(Action action); | 122 void UpdateState(Action action); |
| 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 BeginFrameNeeded() const; | 126 bool BeginFrameNeeded() const; |
| 127 | 127 |
| 128 // Indicates whether the scheduler should call | |
| 129 // SetNeedsBeginFrames(BeginFrameNeeded()) on the frame source. | |
| 130 bool ShouldSetNeedsBeginFrames(bool frame_source_needs_begin_frames) const; | |
| 131 | |
| 132 // 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 |
| 133 // 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 |
| 134 // drawing repeat frames with the synchronous compositor without dropping | 130 // drawing repeat frames with the synchronous compositor without dropping |
| 135 // necessary actions on the floor. | 131 // necessary actions on the floor. |
| 136 bool ShouldPollForAnticipatedDrawTriggers() const; | 132 bool ShouldPollForAnticipatedDrawTriggers() const; |
| 137 | 133 |
| 138 // Indicates that the system has entered and left a BeginImplFrame callback. | 134 // Indicates that the system has entered and left a BeginImplFrame callback. |
| 139 // 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 |
| 140 // callback nor send more than one BeginMainFrame message. | 136 // callback nor send more than one BeginMainFrame message. |
| 141 void OnBeginImplFrame(const BeginFrameArgs& args); | 137 void OnBeginImplFrame(const BeginFrameArgs& args); |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 bool children_need_begin_frames_; | 334 bool children_need_begin_frames_; |
| 339 bool defer_commits_; | 335 bool defer_commits_; |
| 340 | 336 |
| 341 private: | 337 private: |
| 342 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); | 338 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); |
| 343 }; | 339 }; |
| 344 | 340 |
| 345 } // namespace cc | 341 } // namespace cc |
| 346 | 342 |
| 347 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ | 343 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ |
| OLD | NEW |