Chromium Code Reviews| Index: cc/scheduler/scheduler_state_machine.cc |
| diff --git a/cc/scheduler/scheduler_state_machine.cc b/cc/scheduler/scheduler_state_machine.cc |
| index f7919a6a36e0e3ff094ec12a6f1da8e2642f86a8..dea25b40871b440405ed48ea51300224770c26cb 100644 |
| --- a/cc/scheduler/scheduler_state_machine.cc |
| +++ b/cc/scheduler/scheduler_state_machine.cc |
| @@ -464,9 +464,12 @@ bool SchedulerStateMachine::ShouldSendBeginMainFrame() const { |
| if (!HasInitializedOutputSurface()) |
| return false; |
| - // SwapAck throttle the BeginMainFrames |
| + // SwapAck throttle the BeginMainFrames unless we just swapped. |
|
danakj
2014/06/11 23:08:57
This sounds like the opposite of what you have bel
brianderson
2014/06/11 23:25:49
I think the comment and logic do match, it's just
Sami
2014/06/13 10:39:12
The conceptual double negatives here make your hea
brianderson
2014/06/13 18:19:29
I've been trying to figure out why getting rid of
|
| // TODO(brianderson): Remove this restriction to improve throughput. |
| - if (pending_swaps_ >= max_pending_swaps_) |
| + bool just_swapped_in_deadline = |
| + begin_impl_frame_state_ == BEGIN_IMPL_FRAME_STATE_INSIDE_DEADLINE && |
| + HasSwappedThisFrame(); |
| + if (pending_swaps_ >= max_pending_swaps_ && !just_swapped_in_deadline) |
| return false; |
| if (skip_begin_main_frame_to_reduce_latency_) |