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

Unified Diff: cc/scheduler/scheduler_state_machine.cc

Issue 325303002: cc: Don't swap throttle BeginMainFrame just after swapping (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 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_)
« no previous file with comments | « no previous file | cc/scheduler/scheduler_state_machine_unittest.cc » ('j') | cc/scheduler/scheduler_state_machine_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698