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

Unified Diff: cc/scheduler/scheduler_state_machine.cc

Issue 23892022: cc: Always use SetNeedsBeginFrame to request the next BeginFrame (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase on epenner's patch Created 7 years, 3 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
« no previous file with comments | « cc/scheduler/scheduler.cc ('k') | cc/scheduler/scheduler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scheduler/scheduler_state_machine.cc
diff --git a/cc/scheduler/scheduler_state_machine.cc b/cc/scheduler/scheduler_state_machine.cc
index c2cb977fd1e4c3623f3da0023564bc7a7497cf17..c80d9cc0641faae7c69776d81be29aaee39e80cc 100644
--- a/cc/scheduler/scheduler_state_machine.cc
+++ b/cc/scheduler/scheduler_state_machine.cc
@@ -769,6 +769,13 @@ bool SchedulerStateMachine::ProactiveBeginFrameWantedByImplThread() const {
if (needs_manage_tiles_)
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 inopportune time, delaying the next BeginFrame.
+ if (last_frame_number_swap_performed_ == current_frame_number_)
+ return true;
+
return false;
}
« no previous file with comments | « cc/scheduler/scheduler.cc ('k') | cc/scheduler/scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698