Index: cc/scheduler/scheduler_state_machine.cc |
diff --git a/cc/scheduler/scheduler_state_machine.cc b/cc/scheduler/scheduler_state_machine.cc |
index 009cf4bdb59e61ecaf44ae268efc1359caf24a19..355d36c7acfd546287a3b7efcdfcac85c1330ba2 100644 |
--- a/cc/scheduler/scheduler_state_machine.cc |
+++ b/cc/scheduler/scheduler_state_machine.cc |
@@ -740,6 +740,13 @@ bool SchedulerStateMachine::ProactiveBeginFrameWantedByImplThread() const { |
if (has_pending_tree_) |
return true; |
+ // If we just swapped, it's likely that we are going to produce another |
+ // frame soon. This helps avoid negative glitches in our SetNeedsBeginFrame |
+ // requests, which may propagate to the BeginFrame provider and get sampled |
+ // at an innpportune time, delaying the next BeginFrame. |
enne (OOO)
2013/09/13 18:39:19
speling
|
+ if (last_frame_number_swap_performed_ == current_frame_number_) |
+ return true; |
+ |
return false; |
} |