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

Unified Diff: cc/scheduler/scheduler_state_machine.cc

Issue 2731003003: cc: Fix flaky LayerTreeHostScrollTestImplSideInvalidation (Closed)
Patch Set: .. Created 3 years, 9 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/trees/layer_tree_host_unittest_scroll.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 6dd7c39f465a55109f399d7c8ed8caaa5e74b530..e73508ce1ab1fb198c9b69ff0e65609a3e637e8e 100644
--- a/cc/scheduler/scheduler_state_machine.cc
+++ b/cc/scheduler/scheduler_state_machine.cc
@@ -693,9 +693,11 @@ 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));
+ bool can_have_pending_tree =
+ commit_has_no_updates &&
+ (settings_.main_frame_before_activation_enabled ||
+ current_pending_tree_is_impl_side_);
+ DCHECK(!has_pending_tree_ || can_have_pending_tree);
commit_count_++;
last_commit_had_no_updates_ = commit_has_no_updates;
begin_main_frame_state_ = BEGIN_MAIN_FRAME_STATE_IDLE;
@@ -703,7 +705,7 @@ void SchedulerStateMachine::WillCommit(bool commit_has_no_updates) {
if (commit_has_no_updates) {
// Pending tree might still exist from prior commit.
if (has_pending_tree_) {
- DCHECK(settings_.main_frame_before_activation_enabled);
+ DCHECK(can_have_pending_tree);
last_begin_frame_sequence_number_pending_tree_was_fresh_ =
last_begin_frame_sequence_number_begin_main_frame_sent_;
} else {
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_unittest_scroll.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698