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

Unified Diff: cc/scheduler/scheduler_state_machine.h

Issue 1133673004: cc: Heuristic for Renderer latency recovery (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 cf29ca9b6a53ec89a43c1b20e905e9c4792dff8f..2f632cbebbe833ff1f79f72d0cf7f65e935e8adb 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 swaps_are_likely_high_latency() const {
+ return swaps_are_likely_high_latency_;
+ }
+
// Indicates whether the LayerTreeHostImpl is visible.
void SetVisible(bool visible);
bool visible() const { return visible_; }
@@ -317,6 +325,8 @@ class CC_EXPORT SchedulerStateMachine {
int consecutive_checkerboard_animations_;
int max_pending_swaps_;
int pending_swaps_;
+ bool swaps_are_likely_high_latency_;
+ bool swap_throttled_in_last_deadline_;
bool needs_redraw_;
bool needs_animate_;
bool needs_prepare_tiles_;

Powered by Google App Engine
This is Rietveld 408576698