Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(324)

Unified Diff: cc/scheduler/scheduler_state_machine.cc

Issue 1715863002: cc: Update main_thread_missed_last_deadline in aborted draws. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@abortIsSkip2
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/scheduler/scheduler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
sunnyps 2016/02/20 00:27:00 Why was this removed?
brianderson 2016/02/20 00:49:45 Added it back in for this patch.
}
// 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_;
+
// We need to reset needs_redraw_ before we draw since the
// draw itself might request another draw.
needs_redraw_ = false;
« no previous file with comments | « no previous file | cc/scheduler/scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698