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

Unified Diff: cc/scheduler/scheduler_state_machine.cc

Issue 1984453003: cc: Do not reset pending tree state incorrectly on aborted commits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comment Created 4 years, 7 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_state_machine_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 5d6f5895f34931adae9d37191f34e75f0e6fa6fd..3c23a1b3a70ce958593cfdfb9a62a9c60d0d466a 100644
--- a/cc/scheduler/scheduler_state_machine.cc
+++ b/cc/scheduler/scheduler_state_machine.cc
@@ -578,6 +578,9 @@ void SchedulerStateMachine::WillSendBeginMainFrame() {
}
void SchedulerStateMachine::WillCommit(bool commit_has_no_updates) {
+ DCHECK(!has_pending_tree_ ||
+ (settings_.main_frame_before_activation_enabled &&
+ commit_has_no_updates));
commit_count_++;
if (commit_has_no_updates || settings_.main_frame_before_activation_enabled) {
@@ -586,8 +589,9 @@ void SchedulerStateMachine::WillCommit(bool commit_has_no_updates) {
begin_main_frame_state_ = BEGIN_MAIN_FRAME_STATE_WAITING_FOR_ACTIVATION;
}
- // If the commit was aborted, then there is no pending tree.
- has_pending_tree_ = !commit_has_no_updates;
+ // Pending tree only exists if commit had updates.
+ if (!commit_has_no_updates)
+ has_pending_tree_ = true;
wait_for_ready_to_draw_ =
!commit_has_no_updates && settings_.commit_to_active_tree;
« no previous file with comments | « no previous file | cc/scheduler/scheduler_state_machine_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698