| 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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 } | 237 } |
| 238 | 238 |
| 239 bool CouldSendBeginMainFrame() const; | 239 bool CouldSendBeginMainFrame() const; |
| 240 | 240 |
| 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 void SetDeferCommits(bool defer_commits); |
| 248 |
| 247 // TODO(zmo): This is temporary for debugging crbug.com/393331. | 249 // TODO(zmo): This is temporary for debugging crbug.com/393331. |
| 248 // We should remove it afterwards. | 250 // We should remove it afterwards. |
| 249 std::string GetStatesForDebugging() const; | 251 std::string GetStatesForDebugging() const; |
| 250 | 252 |
| 251 protected: | 253 protected: |
| 252 bool BeginFrameNeededToAnimateOrDraw() const; | 254 bool BeginFrameNeededToAnimateOrDraw() const; |
| 253 bool ProactiveBeginFrameWanted() const; | 255 bool ProactiveBeginFrameWanted() const; |
| 254 | 256 |
| 255 // True if we need to force activations to make forward progress. | 257 // True if we need to force activations to make forward progress. |
| 256 bool PendingActivationsShouldBeForced() const; | 258 bool PendingActivationsShouldBeForced() const; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 bool has_pending_tree_; | 316 bool has_pending_tree_; |
| 315 bool pending_tree_is_ready_for_activation_; | 317 bool pending_tree_is_ready_for_activation_; |
| 316 bool active_tree_needs_first_draw_; | 318 bool active_tree_needs_first_draw_; |
| 317 bool did_commit_after_animating_; | 319 bool did_commit_after_animating_; |
| 318 bool did_create_and_initialize_first_output_surface_; | 320 bool did_create_and_initialize_first_output_surface_; |
| 319 bool impl_latency_takes_priority_; | 321 bool impl_latency_takes_priority_; |
| 320 bool skip_next_begin_main_frame_to_reduce_latency_; | 322 bool skip_next_begin_main_frame_to_reduce_latency_; |
| 321 bool skip_begin_main_frame_to_reduce_latency_; | 323 bool skip_begin_main_frame_to_reduce_latency_; |
| 322 bool continuous_painting_; | 324 bool continuous_painting_; |
| 323 bool impl_latency_takes_priority_on_battery_; | 325 bool impl_latency_takes_priority_on_battery_; |
| 326 bool defer_commits_; |
| 324 | 327 |
| 325 private: | 328 private: |
| 326 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); | 329 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); |
| 327 }; | 330 }; |
| 328 | 331 |
| 329 } // namespace cc | 332 } // namespace cc |
| 330 | 333 |
| 331 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ | 334 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ |
| OLD | NEW |