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 | 247 |
248 // TODO(zmo): This is temporary for debugging crbug.com/393331. | 248 // TODO(zmo): This is temporary for debugging crbug.com/393331. |
249 // We should remove it afterwards. | 249 // We should remove it afterwards. |
250 std::string GetStatesForDebugging() const; | 250 std::string GetStatesForDebugging() const; |
251 | 251 |
252 void SetChildrenNeedBeginFrames(bool children_need_begin_frames); | 252 void SetChildrenNeedBeginFrames(bool children_need_begin_frames); |
253 bool children_need_begin_frames() const { | 253 bool children_need_begin_frames() const { |
254 return children_need_begin_frames_; | 254 return children_need_begin_frames_; |
255 } | 255 } |
256 | 256 |
257 bool video_needs_begin_frames() const { return video_needs_begin_frames_; } | |
brianderson
2015/04/16 01:42:23
Accesser below setter for consistency?
sunnyps
2015/04/16 20:56:11
Done.
| |
258 void SetVideoNeedsBeginFrames(bool video_needs_begin_frames); | |
259 | |
257 protected: | 260 protected: |
258 bool BeginFrameRequiredForAction() const; | 261 bool BeginFrameRequiredForAction() const; |
259 bool BeginFrameRequiredForChildren() const; | 262 bool BeginFrameRequiredForChildren() const; |
263 bool BeginFrameNeededForVideo() const; | |
260 bool ProactiveBeginFrameWanted() const; | 264 bool ProactiveBeginFrameWanted() const; |
261 | 265 |
262 bool ShouldTriggerBeginImplFrameDeadlineImmediately() const; | 266 bool ShouldTriggerBeginImplFrameDeadlineImmediately() const; |
263 | 267 |
264 // True if we need to force activations to make forward progress. | 268 // True if we need to force activations to make forward progress. |
265 bool PendingActivationsShouldBeForced() const; | 269 bool PendingActivationsShouldBeForced() const; |
266 | 270 |
267 bool ShouldAnimate() const; | 271 bool ShouldAnimate() const; |
268 bool ShouldBeginOutputSurfaceCreation() const; | 272 bool ShouldBeginOutputSurfaceCreation() const; |
269 bool ShouldDraw() const; | 273 bool ShouldDraw() const; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
323 bool has_pending_tree_; | 327 bool has_pending_tree_; |
324 bool pending_tree_is_ready_for_activation_; | 328 bool pending_tree_is_ready_for_activation_; |
325 bool active_tree_needs_first_draw_; | 329 bool active_tree_needs_first_draw_; |
326 bool did_create_and_initialize_first_output_surface_; | 330 bool did_create_and_initialize_first_output_surface_; |
327 bool impl_latency_takes_priority_; | 331 bool impl_latency_takes_priority_; |
328 bool skip_next_begin_main_frame_to_reduce_latency_; | 332 bool skip_next_begin_main_frame_to_reduce_latency_; |
329 bool skip_begin_main_frame_to_reduce_latency_; | 333 bool skip_begin_main_frame_to_reduce_latency_; |
330 bool continuous_painting_; | 334 bool continuous_painting_; |
331 bool children_need_begin_frames_; | 335 bool children_need_begin_frames_; |
332 bool defer_commits_; | 336 bool defer_commits_; |
337 bool video_needs_begin_frames_; | |
333 bool last_commit_had_no_updates_; | 338 bool last_commit_had_no_updates_; |
334 bool wait_for_active_tree_ready_to_draw_; | 339 bool wait_for_active_tree_ready_to_draw_; |
335 bool did_request_swap_in_last_frame_; | 340 bool did_request_swap_in_last_frame_; |
336 bool did_perform_swap_in_last_draw_; | 341 bool did_perform_swap_in_last_draw_; |
337 | 342 |
338 private: | 343 private: |
339 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); | 344 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); |
340 }; | 345 }; |
341 | 346 |
342 } // namespace cc | 347 } // namespace cc |
343 | 348 |
344 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ | 349 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ |
OLD | NEW |