Index: cc/scheduler/scheduler_state_machine.cc |
diff --git a/cc/scheduler/scheduler_state_machine.cc b/cc/scheduler/scheduler_state_machine.cc |
index b168034c3bb632006ca90dd6c572cb80ca2f67bf..23715ae6dd38b3a5629fe52881a9fa0a6c6747f5 100644 |
--- a/cc/scheduler/scheduler_state_machine.cc |
+++ b/cc/scheduler/scheduler_state_machine.cc |
@@ -613,7 +613,6 @@ void SchedulerStateMachine::WillCommit(bool commit_has_no_updates) { |
forced_redraw_state_ == FORCED_REDRAW_STATE_WAITING_FOR_DRAW) { |
DCHECK(!has_pending_tree_); |
needs_redraw_ = true; |
- active_tree_needs_first_draw_ = true; |
} |
// This post-commit work is common to both completed and aborted commits. |
@@ -643,6 +642,13 @@ void SchedulerStateMachine::WillActivate() { |
} |
void SchedulerStateMachine::WillDrawInternal() { |
+ // If a new active tree is pending after the one we are about to draw, |
+ // the main thread is in a high latency mode. |
+ // main_thread_missed_last_deadline_ is here in addition to |
+ // OnBeginImplFrameIdle for cases where the scheduler aborts draws outside |
+ // of the deadline. |
+ main_thread_missed_last_deadline_ = CommitPending() || has_pending_tree_; |
brianderson
2016/02/19 01:52:17
Need to add a unit test for this, but probably won
|
+ |
// We need to reset needs_redraw_ before we draw since the |
// draw itself might request another draw. |
needs_redraw_ = false; |