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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 // swap when there is not damage, for example. | 170 // swap when there is not damage, for example. |
171 void DidSwapBuffers(); | 171 void DidSwapBuffers(); |
172 | 172 |
173 // Indicates whether a redraw is required because we are currently rendering | 173 // Indicates whether a redraw is required because we are currently rendering |
174 // with a low resolution or checkerboarded tile. | 174 // with a low resolution or checkerboarded tile. |
175 void SetSwapUsedIncompleteTile(bool used_incomplete_tile); | 175 void SetSwapUsedIncompleteTile(bool used_incomplete_tile); |
176 | 176 |
177 // Notification from the OutputSurface that a swap has been consumed. | 177 // Notification from the OutputSurface that a swap has been consumed. |
178 void DidSwapBuffersComplete(); | 178 void DidSwapBuffersComplete(); |
179 | 179 |
180 // Indicates whether to prioritize animation smoothness over new content | 180 // Indicates whether to prioritize impl thread latency (i.e., animation |
181 // activation. | 181 // smoothness) over new content activation. |
182 void SetSmoothnessTakesPriority(bool smoothness_takes_priority); | 182 void SetImplLatencyTakesPriority(bool impl_latency_takes_priority); |
183 bool smoothness_takes_priority() const { return smoothness_takes_priority_; } | 183 bool impl_latency_takes_priority() const { |
| 184 return impl_latency_takes_priority_; |
| 185 } |
184 | 186 |
185 // Indicates whether ACTION_DRAW_AND_SWAP_IF_POSSIBLE drew to the screen. | 187 // Indicates whether ACTION_DRAW_AND_SWAP_IF_POSSIBLE drew to the screen. |
186 void DidDrawIfPossibleCompleted(DrawResult result); | 188 void DidDrawIfPossibleCompleted(DrawResult result); |
187 | 189 |
188 // Indicates that a new commit flow needs to be performed, either to pull | 190 // Indicates that a new commit flow needs to be performed, either to pull |
189 // updates from the main thread to the impl, or to push deltas from the impl | 191 // updates from the main thread to the impl, or to push deltas from the impl |
190 // thread to main. | 192 // thread to main. |
191 void SetNeedsCommit(); | 193 void SetNeedsCommit(); |
192 | 194 |
193 // Call this only in response to receiving an ACTION_SEND_BEGIN_MAIN_FRAME | 195 // Call this only in response to receiving an ACTION_SEND_BEGIN_MAIN_FRAME |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 bool swap_used_incomplete_tile_; | 302 bool swap_used_incomplete_tile_; |
301 bool needs_commit_; | 303 bool needs_commit_; |
302 bool inside_poll_for_anticipated_draw_triggers_; | 304 bool inside_poll_for_anticipated_draw_triggers_; |
303 bool visible_; | 305 bool visible_; |
304 bool can_start_; | 306 bool can_start_; |
305 bool can_draw_; | 307 bool can_draw_; |
306 bool has_pending_tree_; | 308 bool has_pending_tree_; |
307 bool pending_tree_is_ready_for_activation_; | 309 bool pending_tree_is_ready_for_activation_; |
308 bool active_tree_needs_first_draw_; | 310 bool active_tree_needs_first_draw_; |
309 bool did_create_and_initialize_first_output_surface_; | 311 bool did_create_and_initialize_first_output_surface_; |
310 bool smoothness_takes_priority_; | 312 bool impl_latency_takes_priority_; |
311 bool skip_next_begin_main_frame_to_reduce_latency_; | 313 bool skip_next_begin_main_frame_to_reduce_latency_; |
312 bool skip_begin_main_frame_to_reduce_latency_; | 314 bool skip_begin_main_frame_to_reduce_latency_; |
313 bool continuous_painting_; | 315 bool continuous_painting_; |
314 | 316 |
315 private: | 317 private: |
316 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); | 318 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); |
317 }; | 319 }; |
318 | 320 |
319 } // namespace cc | 321 } // namespace cc |
320 | 322 |
321 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ | 323 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ |
OLD | NEW |