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