| 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 bool PendingDrawsShouldBeAborted() const; | 247 bool PendingDrawsShouldBeAborted() const; |
| 248 | 248 |
| 249 bool SupportsProactiveBeginFrame() const; | 249 bool SupportsProactiveBeginFrame() const; |
| 250 | 250 |
| 251 void SetContinuousPainting(bool continuous_painting) { | 251 void SetContinuousPainting(bool continuous_painting) { |
| 252 continuous_painting_ = continuous_painting; | 252 continuous_painting_ = continuous_painting; |
| 253 } | 253 } |
| 254 | 254 |
| 255 bool CouldSendBeginMainFrame() const; | 255 bool CouldSendBeginMainFrame() const; |
| 256 | 256 |
| 257 void SetImplLatencyTakesPriorityOnBattery( | |
| 258 bool impl_latency_takes_priority_on_battery) { | |
| 259 impl_latency_takes_priority_on_battery_ = | |
| 260 impl_latency_takes_priority_on_battery; | |
| 261 } | |
| 262 | |
| 263 void SetDeferCommits(bool defer_commits); | 257 void SetDeferCommits(bool defer_commits); |
| 264 | 258 |
| 265 // TODO(zmo): This is temporary for debugging crbug.com/393331. | 259 // TODO(zmo): This is temporary for debugging crbug.com/393331. |
| 266 // We should remove it afterwards. | 260 // We should remove it afterwards. |
| 267 std::string GetStatesForDebugging() const; | 261 std::string GetStatesForDebugging() const; |
| 268 | 262 |
| 269 void SetChildrenNeedBeginFrames(bool children_need_begin_frames); | 263 void SetChildrenNeedBeginFrames(bool children_need_begin_frames); |
| 270 bool children_need_begin_frames() const { | 264 bool children_need_begin_frames() const { |
| 271 return children_need_begin_frames_; | 265 return children_need_begin_frames_; |
| 272 } | 266 } |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 bool can_draw_; | 328 bool can_draw_; |
| 335 bool has_pending_tree_; | 329 bool has_pending_tree_; |
| 336 bool pending_tree_is_ready_for_activation_; | 330 bool pending_tree_is_ready_for_activation_; |
| 337 bool active_tree_needs_first_draw_; | 331 bool active_tree_needs_first_draw_; |
| 338 bool did_commit_after_animating_; | 332 bool did_commit_after_animating_; |
| 339 bool did_create_and_initialize_first_output_surface_; | 333 bool did_create_and_initialize_first_output_surface_; |
| 340 bool impl_latency_takes_priority_; | 334 bool impl_latency_takes_priority_; |
| 341 bool skip_next_begin_main_frame_to_reduce_latency_; | 335 bool skip_next_begin_main_frame_to_reduce_latency_; |
| 342 bool skip_begin_main_frame_to_reduce_latency_; | 336 bool skip_begin_main_frame_to_reduce_latency_; |
| 343 bool continuous_painting_; | 337 bool continuous_painting_; |
| 344 bool impl_latency_takes_priority_on_battery_; | |
| 345 bool children_need_begin_frames_; | 338 bool children_need_begin_frames_; |
| 346 bool defer_commits_; | 339 bool defer_commits_; |
| 347 | 340 |
| 348 private: | 341 private: |
| 349 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); | 342 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); |
| 350 }; | 343 }; |
| 351 | 344 |
| 352 } // namespace cc | 345 } // namespace cc |
| 353 | 346 |
| 354 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ | 347 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ |
| OLD | NEW |