| Index: cc/scheduler/scheduler_state_machine.cc
|
| diff --git a/cc/scheduler/scheduler_state_machine.cc b/cc/scheduler/scheduler_state_machine.cc
|
| index 800f4131779189e3e5da873f3fe735f11405e59a..cd56a5f05427c558a806c4ad51fba8b2f51fca9c 100644
|
| --- a/cc/scheduler/scheduler_state_machine.cc
|
| +++ b/cc/scheduler/scheduler_state_machine.cc
|
| @@ -367,6 +367,9 @@ bool SchedulerStateMachine::ShouldDraw() const {
|
| if (begin_impl_frame_state_ != BEGIN_IMPL_FRAME_STATE_INSIDE_DEADLINE)
|
| return false;
|
|
|
| + if (wait_for_ready_to_draw_)
|
| + return false;
|
| +
|
| // Only handle forced redraws due to timeouts on the regular deadline.
|
| if (forced_redraw_state_ == FORCED_REDRAW_STATE_WAITING_FOR_DRAW)
|
| return true;
|
| @@ -484,6 +487,10 @@ bool SchedulerStateMachine::ShouldCommit() const {
|
| return false;
|
| }
|
|
|
| + // Active tree resources might still be in use until the Display draws.
|
| + if (settings_.commit_to_active_tree && SwapThrottled())
|
| + return false;
|
| +
|
| // If we only have an active tree, it is incorrect to replace it
|
| // before we've drawn it.
|
| DCHECK(!settings_.commit_to_active_tree || !active_tree_needs_first_draw_);
|
| @@ -1029,11 +1036,6 @@ void SchedulerStateMachine::NotifyReadyToCommit() {
|
| DCHECK_EQ(begin_main_frame_state_, BEGIN_MAIN_FRAME_STATE_STARTED)
|
| << AsValue()->ToString();
|
| begin_main_frame_state_ = BEGIN_MAIN_FRAME_STATE_READY_TO_COMMIT;
|
| - // In commit_to_active_tree mode, commit should happen right after
|
| - // BeginFrame, meaning when this function is called, next action should be
|
| - // commit.
|
| - if (settings_.commit_to_active_tree)
|
| - DCHECK(ShouldCommit());
|
| }
|
|
|
| void SchedulerStateMachine::BeginMainFrameAborted(CommitEarlyOutReason reason) {
|
|
|