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

Unified Diff: cc/scheduler/scheduler_state_machine.h

Issue 54913003: Scheduler: Switch from high to low latency mode if possible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 2 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.h
diff --git a/cc/scheduler/scheduler_state_machine.h b/cc/scheduler/scheduler_state_machine.h
index 9b6d4fb41ed622c5f2fe766c813e7479ed0b0ec7..6f29503841ab8d5a73b4fc1c8bcdbbf906fab963 100644
--- a/cc/scheduler/scheduler_state_machine.h
+++ b/cc/scheduler/scheduler_state_machine.h
@@ -146,6 +146,10 @@ class CC_EXPORT SchedulerStateMachine {
return begin_impl_frame_state_;
}
+ // If there's something to draw on BeginImplFrame the impl thread is lagging
+ // behind the main thread. We're thus in high latency mode.
brianderson 2013/11/01 00:22:59 "the main thread is lagging behind the impl thread
Dominik Grewe 2013/11/01 17:09:14 But the main thread is one frame ahead, isn't it?
brianderson 2013/11/01 21:18:30 The main thread gets into a high latency mode by b
+ bool InHighLatencyMode() const;
+
// PollForAnticipatedDrawTriggers is used by the synchronous compositor to
// avoid requesting BeginImplFrames when we won't actually draw but still
// need to advance our state at vsync intervals.
@@ -209,6 +213,8 @@ class CC_EXPORT SchedulerStateMachine {
// Set that we can create the first OutputSurface and start the scheduler.
void SetCanStart() { can_start_ = true; }
+ void SetSkipBeginMainFrame(bool skip);
brianderson 2013/11/01 00:22:59 SkipNextBeginMainFrame()? Actually, nevermind; th
+
// Indicates whether drawing would, at this time, make sense.
// CanDraw can be used to supress flashes or checkerboarding
// when such behavior would be undesirable.
@@ -288,6 +294,7 @@ class CC_EXPORT SchedulerStateMachine {
bool draw_if_possible_failed_;
bool did_create_and_initialize_first_output_surface_;
bool smoothness_takes_priority_;
+ bool skip_begin_main_frame_;
brianderson 2013/11/01 00:22:59 skip_begin_main_frame_to_reduce_latency_
Dominik Grewe 2013/11/01 17:09:14 Done. Also changed the name of the corresponding s
private:
DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine);

Powered by Google App Engine
This is Rietveld 408576698