Chromium Code Reviews| Index: cc/scheduler/scheduler_state_machine.cc |
| diff --git a/cc/scheduler/scheduler_state_machine.cc b/cc/scheduler/scheduler_state_machine.cc |
| index 9dd65511669916003de3cc8cab5acbb66bc2682b..4faa9116118bcee718e986fab8cc0a2620f2cde8 100644 |
| --- a/cc/scheduler/scheduler_state_machine.cc |
| +++ b/cc/scheduler/scheduler_state_machine.cc |
| @@ -26,11 +26,11 @@ SchedulerStateMachine::SchedulerStateMachine(const SchedulerSettings& settings) |
| last_frame_number_swap_requested_(-1), |
| last_frame_number_begin_main_frame_sent_(-1), |
| last_frame_number_invalidate_output_surface_performed_(-1), |
| - animate_funnel_(false), |
| - request_swap_funnel_(false), |
| - send_begin_main_frame_funnel_(false), |
| - invalidate_output_surface_funnel_(false), |
| - prepare_tiles_funnel_(0), |
| + animate_funnel_(true), |
| + request_swap_funnel_(true), |
| + send_begin_main_frame_funnel_(true), |
| + invalidate_output_surface_funnel_(true), |
| + prepare_tiles_funnel_(1), |
|
mithro-old
2015/07/08 03:26:33
Why do these values change?
sunnyps
2015/07/13 23:56:11
Only the value for send_begin_main_frame_funnel_ n
|
| consecutive_checkerboard_animations_(0), |
| max_pending_swaps_(1), |
| pending_swaps_(0), |
| @@ -421,7 +421,8 @@ bool SchedulerStateMachine::ShouldSendBeginMainFrame() const { |
| if (!CouldSendBeginMainFrame()) |
| return false; |
| - // Do not send begin main frame too many times in a single frame. |
| + // Do not send begin main frame too many times in a single frame or before |
| + // the first BeginFrame. |
| if (send_begin_main_frame_funnel_) |
| return false; |
| @@ -439,14 +440,16 @@ bool SchedulerStateMachine::ShouldSendBeginMainFrame() const { |
| return false; |
| } |
| - // We should not send BeginMainFrame while we are in |
| - // BEGIN_IMPL_FRAME_STATE_IDLE since we might have new |
| - // user input arriving soon. |
| + // We should not send BeginMainFrame while we are in the idle state since we |
| + // might have new user input arriving soon. It's okay to send BeginMainFrame |
| + // for the synchronous compositor because the main thread is always high |
| + // latency in that case. |
| // TODO(brianderson): Allow sending BeginMainFrame while idle when the main |
| - // thread isn't consuming user input. |
| - if (begin_impl_frame_state_ == BEGIN_IMPL_FRAME_STATE_IDLE && |
| - BeginFrameNeeded()) |
| + // thread isn't consuming user input for non-synchronous compositor. |
| + if (!settings_.using_synchronous_renderer_compositor && |
| + begin_impl_frame_state_ == BEGIN_IMPL_FRAME_STATE_IDLE) { |
| return false; |
| + } |
| // We need a new commit for the forced redraw. This honors the |
| // single commit per interval because the result will be swapped to screen. |