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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 // TODO(sunnyps): Rename OnBeginImplFrameDeadline to OnDraw or similar. | 136 // TODO(sunnyps): Rename OnBeginImplFrameDeadline to OnDraw or similar. |
137 void OnBeginImplFrameDeadline(); | 137 void OnBeginImplFrameDeadline(); |
138 void OnBeginImplFrameIdle(); | 138 void OnBeginImplFrameIdle(); |
139 BeginImplFrameState begin_impl_frame_state() const { | 139 BeginImplFrameState begin_impl_frame_state() const { |
140 return begin_impl_frame_state_; | 140 return begin_impl_frame_state_; |
141 } | 141 } |
142 BeginImplFrameDeadlineMode CurrentBeginImplFrameDeadlineMode() const; | 142 BeginImplFrameDeadlineMode CurrentBeginImplFrameDeadlineMode() const; |
143 | 143 |
144 // If the main thread didn't manage to produce a new frame in time for the | 144 // If the main thread didn't manage to produce a new frame in time for the |
145 // impl thread to draw, it is in a high latency mode. | 145 // impl thread to draw, it is in a high latency mode. |
146 bool MainThreadIsInHighLatencyMode() const; | 146 bool main_thread_missed_last_deadline() const; |
147 | 147 |
148 bool SwapThrottled() const; | 148 bool SwapThrottled() const; |
149 | 149 |
150 // Indicates whether the LayerTreeHostImpl is visible. | 150 // Indicates whether the LayerTreeHostImpl is visible. |
151 void SetVisible(bool visible); | 151 void SetVisible(bool visible); |
152 bool visible() const { return visible_; } | 152 bool visible() const { return visible_; } |
153 | 153 |
154 // Indicates that a redraw is required, either due to the impl tree changing | 154 // Indicates that a redraw is required, either due to the impl tree changing |
155 // or the screen being damaged and simply needing redisplay. | 155 // or the screen being damaged and simply needing redisplay. |
156 void SetNeedsRedraw(); | 156 void SetNeedsRedraw(); |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 bool needs_prepare_tiles_; | 330 bool needs_prepare_tiles_; |
331 bool needs_commit_; | 331 bool needs_commit_; |
332 bool visible_; | 332 bool visible_; |
333 bool can_start_; | 333 bool can_start_; |
334 bool can_draw_; | 334 bool can_draw_; |
335 bool has_pending_tree_; | 335 bool has_pending_tree_; |
336 bool pending_tree_is_ready_for_activation_; | 336 bool pending_tree_is_ready_for_activation_; |
337 bool active_tree_needs_first_draw_; | 337 bool active_tree_needs_first_draw_; |
338 bool did_create_and_initialize_first_output_surface_; | 338 bool did_create_and_initialize_first_output_surface_; |
339 bool impl_latency_takes_priority_; | 339 bool impl_latency_takes_priority_; |
| 340 bool main_thread_missed_last_deadline_; |
340 bool skip_next_begin_main_frame_to_reduce_latency_; | 341 bool skip_next_begin_main_frame_to_reduce_latency_; |
341 bool continuous_painting_; | 342 bool continuous_painting_; |
342 bool children_need_begin_frames_; | 343 bool children_need_begin_frames_; |
343 bool defer_commits_; | 344 bool defer_commits_; |
344 bool video_needs_begin_frames_; | 345 bool video_needs_begin_frames_; |
345 bool last_commit_had_no_updates_; | 346 bool last_commit_had_no_updates_; |
346 bool wait_for_active_tree_ready_to_draw_; | 347 bool wait_for_active_tree_ready_to_draw_; |
347 bool did_request_swap_in_last_frame_; | 348 bool did_request_swap_in_last_frame_; |
348 bool did_perform_swap_in_last_draw_; | 349 bool did_perform_swap_in_last_draw_; |
349 | 350 |
350 private: | 351 private: |
351 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); | 352 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); |
352 }; | 353 }; |
353 | 354 |
354 } // namespace cc | 355 } // namespace cc |
355 | 356 |
356 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ | 357 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ |
OLD | NEW |