| 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 void SetContinuousPainting(bool continuous_painting) { | 236 void SetContinuousPainting(bool continuous_painting) { |
| 237 continuous_painting_ = continuous_painting; | 237 continuous_painting_ = continuous_painting; |
| 238 } | 238 } |
| 239 | 239 |
| 240 bool CouldSendBeginMainFrame() const; | 240 bool CouldSendBeginMainFrame() const; |
| 241 | 241 |
| 242 // TODO(zmo): This is temporary for debugging crbug.com/393331. | 242 // TODO(zmo): This is temporary for debugging crbug.com/393331. |
| 243 // We should remove it afterwards. | 243 // We should remove it afterwards. |
| 244 std::string GetStatesForDebugging() const; | 244 std::string GetStatesForDebugging() const; |
| 245 | 245 |
| 246 void SetChildrenNeedBeginFrames(bool children_need_begin_frames); |
| 247 bool children_need_begin_frames() { return children_need_begin_frames_; } |
| 248 |
| 246 protected: | 249 protected: |
| 247 bool BeginFrameNeededToAnimateOrDraw() const; | 250 bool BeginFrameNeededToAnimateOrDraw() const; |
| 251 bool BeginFrameNeededToChildren() const; |
| 248 bool ProactiveBeginFrameWanted() const; | 252 bool ProactiveBeginFrameWanted() const; |
| 249 | 253 |
| 250 // True if we need to force activations to make forward progress. | 254 // True if we need to force activations to make forward progress. |
| 251 bool PendingActivationsShouldBeForced() const; | 255 bool PendingActivationsShouldBeForced() const; |
| 252 | 256 |
| 253 bool ShouldAnimate() const; | 257 bool ShouldAnimate() const; |
| 254 bool ShouldBeginOutputSurfaceCreation() const; | 258 bool ShouldBeginOutputSurfaceCreation() const; |
| 255 bool ShouldDrawForced() const; | 259 bool ShouldDrawForced() const; |
| 256 bool ShouldDraw() const; | 260 bool ShouldDraw() const; |
| 257 bool ShouldActivatePendingTree() const; | 261 bool ShouldActivatePendingTree() const; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 bool can_start_; | 310 bool can_start_; |
| 307 bool can_draw_; | 311 bool can_draw_; |
| 308 bool has_pending_tree_; | 312 bool has_pending_tree_; |
| 309 bool pending_tree_is_ready_for_activation_; | 313 bool pending_tree_is_ready_for_activation_; |
| 310 bool active_tree_needs_first_draw_; | 314 bool active_tree_needs_first_draw_; |
| 311 bool did_create_and_initialize_first_output_surface_; | 315 bool did_create_and_initialize_first_output_surface_; |
| 312 bool impl_latency_takes_priority_; | 316 bool impl_latency_takes_priority_; |
| 313 bool skip_next_begin_main_frame_to_reduce_latency_; | 317 bool skip_next_begin_main_frame_to_reduce_latency_; |
| 314 bool skip_begin_main_frame_to_reduce_latency_; | 318 bool skip_begin_main_frame_to_reduce_latency_; |
| 315 bool continuous_painting_; | 319 bool continuous_painting_; |
| 320 bool children_need_begin_frames_; |
| 316 | 321 |
| 317 private: | 322 private: |
| 318 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); | 323 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); |
| 319 }; | 324 }; |
| 320 | 325 |
| 321 } // namespace cc | 326 } // namespace cc |
| 322 | 327 |
| 323 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ | 328 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ |
| OLD | NEW |