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

Unified Diff: cc/scheduler/scheduler_state_machine.h

Issue 1012853003: Add DisplayScheduler for Surfaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change Browser references to root surfce Created 5 years, 8 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_state_machine.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scheduler/scheduler_state_machine.h
diff --git a/cc/scheduler/scheduler_state_machine.h b/cc/scheduler/scheduler_state_machine.h
index cf29ca9b6a53ec89a43c1b20e905e9c4792dff8f..5787ec9e5c625802befe827c167fe7c56b7eb445 100644
--- a/cc/scheduler/scheduler_state_machine.h
+++ b/cc/scheduler/scheduler_state_machine.h
@@ -126,6 +126,10 @@ class CC_EXPORT SchedulerStateMachine {
// to make progress.
bool BeginFrameNeeded() const;
+ // Notifies the statme machine that the Scheduler skipped a BeginImplFrame
+ // so the state machine can reset associated state.
+ void DidSkipBeginImplFrameToReduceLatency();
+
// Indicates that the system has entered and left a BeginImplFrame callback.
// The scheduler will not draw more than once in a given BeginImplFrame
// callback nor send more than one BeginMainFrame message.
@@ -145,6 +149,10 @@ class CC_EXPORT SchedulerStateMachine {
// impl thread to draw, it is in a high latency mode.
bool MainThreadIsInHighLatencyMode() const;
+ bool last_swap_ack_came_after_begin_impl_frame() const {
+ return last_swap_ack_came_after_begin_impl_frame_;
+ }
+
// Indicates whether the LayerTreeHostImpl is visible.
void SetVisible(bool visible);
bool visible() const { return visible_; }
@@ -317,6 +325,7 @@ class CC_EXPORT SchedulerStateMachine {
int consecutive_checkerboard_animations_;
int max_pending_swaps_;
int pending_swaps_;
+ bool last_swap_ack_came_after_begin_impl_frame_;
bool needs_redraw_;
bool needs_animate_;
bool needs_prepare_tiles_;
« no previous file with comments | « cc/scheduler/scheduler.cc ('k') | cc/scheduler/scheduler_state_machine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698