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