| 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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 void SetImplLatencyTakesPriorityOnBattery( | 240 void SetImplLatencyTakesPriorityOnBattery( |
| 241 bool impl_latency_takes_priority_on_battery) { | 241 bool impl_latency_takes_priority_on_battery) { |
| 242 impl_latency_takes_priority_on_battery_ = | 242 impl_latency_takes_priority_on_battery_ = |
| 243 impl_latency_takes_priority_on_battery; | 243 impl_latency_takes_priority_on_battery; |
| 244 } | 244 } |
| 245 | 245 |
| 246 // TODO(zmo): This is temporary for debugging crbug.com/393331. | 246 // TODO(zmo): This is temporary for debugging crbug.com/393331. |
| 247 // We should remove it afterwards. | 247 // We should remove it afterwards. |
| 248 std::string GetStatesForDebugging() const; | 248 std::string GetStatesForDebugging() const; |
| 249 | 249 |
| 250 void SetChildrenNeedBeginFrames(bool children_need_begin_frames); |
| 251 bool children_need_begin_frames() const { |
| 252 return children_need_begin_frames_; |
| 253 } |
| 254 |
| 250 protected: | 255 protected: |
| 251 bool BeginFrameNeededToAnimateOrDraw() const; | 256 bool BeginFrameNeededToAnimateOrDraw() const; |
| 257 bool BeginFrameNeededForChildren() const; |
| 252 bool ProactiveBeginFrameWanted() const; | 258 bool ProactiveBeginFrameWanted() const; |
| 253 | 259 |
| 254 // True if we need to force activations to make forward progress. | 260 // True if we need to force activations to make forward progress. |
| 255 bool PendingActivationsShouldBeForced() const; | 261 bool PendingActivationsShouldBeForced() const; |
| 256 | 262 |
| 257 bool ShouldAnimate() const; | 263 bool ShouldAnimate() const; |
| 258 bool ShouldBeginOutputSurfaceCreation() const; | 264 bool ShouldBeginOutputSurfaceCreation() const; |
| 259 bool ShouldDrawForced() const; | 265 bool ShouldDrawForced() const; |
| 260 bool ShouldDraw() const; | 266 bool ShouldDraw() const; |
| 261 bool ShouldActivatePendingTree() const; | 267 bool ShouldActivatePendingTree() const; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 bool has_pending_tree_; | 315 bool has_pending_tree_; |
| 310 bool pending_tree_is_ready_for_activation_; | 316 bool pending_tree_is_ready_for_activation_; |
| 311 bool active_tree_needs_first_draw_; | 317 bool active_tree_needs_first_draw_; |
| 312 bool did_commit_after_animating_; | 318 bool did_commit_after_animating_; |
| 313 bool did_create_and_initialize_first_output_surface_; | 319 bool did_create_and_initialize_first_output_surface_; |
| 314 bool impl_latency_takes_priority_; | 320 bool impl_latency_takes_priority_; |
| 315 bool skip_next_begin_main_frame_to_reduce_latency_; | 321 bool skip_next_begin_main_frame_to_reduce_latency_; |
| 316 bool skip_begin_main_frame_to_reduce_latency_; | 322 bool skip_begin_main_frame_to_reduce_latency_; |
| 317 bool continuous_painting_; | 323 bool continuous_painting_; |
| 318 bool impl_latency_takes_priority_on_battery_; | 324 bool impl_latency_takes_priority_on_battery_; |
| 325 bool children_need_begin_frames_; |
| 319 | 326 |
| 320 private: | 327 private: |
| 321 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); | 328 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); |
| 322 }; | 329 }; |
| 323 | 330 |
| 324 } // namespace cc | 331 } // namespace cc |
| 325 | 332 |
| 326 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ | 333 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ |
| OLD | NEW |