Index: cc/scheduler/scheduler_state_machine.cc |
diff --git a/cc/scheduler/scheduler_state_machine.cc b/cc/scheduler/scheduler_state_machine.cc |
index d54907f4059f844307e7370126faf5c7784ac2e2..c3a4a1e272a5a6006ac49548dea5b206cdb40a0b 100644 |
--- a/cc/scheduler/scheduler_state_machine.cc |
+++ b/cc/scheduler/scheduler_state_machine.cc |
@@ -875,18 +875,18 @@ |
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 |
// activate. |
// TODO(skyostil): Revisit this when we have more accurate deadline estimates. |
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. |