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

Unified Diff: cc/scheduler/scheduler_state_machine.cc

Issue 862133002: Update from https://crrev.com/312398 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
Index: cc/scheduler/scheduler_state_machine.cc
diff --git a/cc/scheduler/scheduler_state_machine.cc b/cc/scheduler/scheduler_state_machine.cc
index c3a4a1e272a5a6006ac49548dea5b206cdb40a0b..d54907f4059f844307e7370126faf5c7784ac2e2 100644
--- a/cc/scheduler/scheduler_state_machine.cc
+++ b/cc/scheduler/scheduler_state_machine.cc
@@ -875,12 +875,6 @@ bool SchedulerStateMachine::ShouldTriggerBeginImplFrameDeadlineImmediately()
if (pending_swaps_ >= max_pending_swaps_)
return false;
- if (active_tree_needs_first_draw_)
- return true;
-
- if (!needs_redraw_)
- return false;
-
// This is used to prioritize impl-thread draws when the main thread isn't
// producing anything, e.g., after an aborted commit. We also check that we
// don't have a pending tree -- otherwise we should give it a chance to
@@ -889,6 +883,12 @@ bool SchedulerStateMachine::ShouldTriggerBeginImplFrameDeadlineImmediately()
if (commit_state_ == COMMIT_STATE_IDLE && !has_pending_tree_)
return true;
+ if (!needs_redraw_)
+ return false;
+
+ if (active_tree_needs_first_draw_)
+ return true;
+
// Prioritize impl-thread draws in impl_latency_takes_priority_ mode.
if (impl_latency_takes_priority_)
return true;
« no previous file with comments | « cc/scheduler/scheduler.cc ('k') | cc/scheduler/scheduler_unittest.cc » ('j') | shell/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698