| 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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 // TODO(zmo): This is temporary for debugging crbug.com/393331. | 241 // TODO(zmo): This is temporary for debugging crbug.com/393331. |
| 242 // We should remove it afterwards. | 242 // We should remove it afterwards. |
| 243 std::string GetStatesForDebugging() const; | 243 std::string GetStatesForDebugging() const; |
| 244 | 244 |
| 245 void SetChildrenNeedBeginFrames(bool children_need_begin_frames); | 245 void SetChildrenNeedBeginFrames(bool children_need_begin_frames); |
| 246 bool children_need_begin_frames() const { | 246 bool children_need_begin_frames() const { |
| 247 return children_need_begin_frames_; | 247 return children_need_begin_frames_; |
| 248 } | 248 } |
| 249 | 249 |
| 250 protected: | 250 protected: |
| 251 bool BeginFrameNeededToAnimateOrDraw() const; | 251 bool BeginFrameRequiredForAction() const; |
| 252 bool BeginFrameNeededForChildren() const; | 252 bool BeginFrameRequiredForChildren() const; |
| 253 bool ProactiveBeginFrameWanted() const; | 253 bool ProactiveBeginFrameWanted() const; |
| 254 | 254 |
| 255 bool ShouldTriggerBeginImplFrameDeadlineImmediately() const; | 255 bool ShouldTriggerBeginImplFrameDeadlineImmediately() const; |
| 256 | 256 |
| 257 // True if we need to force activations to make forward progress. | 257 // True if we need to force activations to make forward progress. |
| 258 bool PendingActivationsShouldBeForced() const; | 258 bool PendingActivationsShouldBeForced() const; |
| 259 | 259 |
| 260 bool ShouldAnimate() const; | 260 bool ShouldAnimate() const; |
| 261 bool ShouldBeginOutputSurfaceCreation() const; | 261 bool ShouldBeginOutputSurfaceCreation() const; |
| 262 bool ShouldDraw() const; | 262 bool ShouldDraw() const; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 bool did_request_swap_in_last_frame_; | 327 bool did_request_swap_in_last_frame_; |
| 328 bool did_perform_swap_in_last_draw_; | 328 bool did_perform_swap_in_last_draw_; |
| 329 | 329 |
| 330 private: | 330 private: |
| 331 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); | 331 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); |
| 332 }; | 332 }; |
| 333 | 333 |
| 334 } // namespace cc | 334 } // namespace cc |
| 335 | 335 |
| 336 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ | 336 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ |
| OLD | NEW |