Index: cc/scheduler/scheduler_state_machine.h |
diff --git a/cc/scheduler/scheduler_state_machine.h b/cc/scheduler/scheduler_state_machine.h |
index cf29ca9b6a53ec89a43c1b20e905e9c4792dff8f..c912d2b1704889a93fcbd768eb271806b9c88a8a 100644 |
--- a/cc/scheduler/scheduler_state_machine.h |
+++ b/cc/scheduler/scheduler_state_machine.h |
@@ -145,6 +145,10 @@ class CC_EXPORT SchedulerStateMachine { |
// impl thread to draw, it is in a high latency mode. |
bool MainThreadIsInHighLatencyMode() const; |
+ bool swaps_are_likely_high_latency() const { |
+ return swaps_are_likely_high_latency_; |
+ } |
+ |
// Indicates whether the LayerTreeHostImpl is visible. |
void SetVisible(bool visible); |
bool visible() const { return visible_; } |
@@ -193,6 +197,7 @@ class CC_EXPORT SchedulerStateMachine { |
// updates from the main thread to the impl, or to push deltas from the impl |
// thread to main. |
void SetNeedsCommit(); |
+ bool needs_commit() const { return needs_commit_; } |
// Call this only in response to receiving an ACTION_SEND_BEGIN_MAIN_FRAME |
// from NextAction. |
@@ -208,7 +213,9 @@ class CC_EXPORT SchedulerStateMachine { |
// Allow access of the can_start_ state in tests. |
bool CanStartForTesting() const { return can_start_; } |
+ // Indicates production should be skipped to recover latency. |
void SetSkipNextBeginMainFrameToReduceLatency(); |
+ void SetSkipNextSwapToReduceLatency(); |
// Indicates whether drawing would, at this time, make sense. |
// CanDraw can be used to suppress flashes or checkerboarding |
@@ -317,6 +324,8 @@ class CC_EXPORT SchedulerStateMachine { |
int consecutive_checkerboard_animations_; |
int max_pending_swaps_; |
int pending_swaps_; |
+ bool swaps_are_likely_high_latency_; |
+ bool was_swap_throttled_on_begin_impl_frame_; |
bool needs_redraw_; |
bool needs_animate_; |
bool needs_prepare_tiles_; |
@@ -330,7 +339,7 @@ class CC_EXPORT SchedulerStateMachine { |
bool did_create_and_initialize_first_output_surface_; |
bool impl_latency_takes_priority_; |
bool skip_next_begin_main_frame_to_reduce_latency_; |
- bool skip_begin_main_frame_to_reduce_latency_; |
+ bool skip_next_swap_to_reduce_latency_; |
bool continuous_painting_; |
bool children_need_begin_frames_; |
bool defer_commits_; |