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

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: rebase; really simplify heuristic 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 238c08c42d166c47acd80c4a682fd225cbf6d033..41112ff04a19bd2bea0ca65c4371777747707759 100644
--- a/cc/scheduler/scheduler_state_machine.h
+++ b/cc/scheduler/scheduler_state_machine.h
@@ -145,6 +145,10 @@ class CC_EXPORT SchedulerStateMachine {
// impl thread to draw, it is in a high latency mode.
bool MainThreadIsInHighLatencyMode() const;
+ bool ImplThreadIsLikelyInHighLatencyMode() const {
sunnyps 2015/05/22 21:15:05 Rename this to IsSwapThrottled or similar. We are
brianderson 2015/06/30 22:03:52 Done.
+ return pending_swaps_ >= max_pending_swaps_;
+ }
+
// Indicates whether the LayerTreeHostImpl is visible.
void SetVisible(bool visible);
bool visible() const { return visible_; }
@@ -193,6 +197,7 @@ class CC_EXPORT SchedulerStateMachine {
// updates from the main thread to the impl, or to push deltas from the impl
// thread to main.
void SetNeedsCommit();
+ bool needs_commit() const { return needs_commit_; }
// Call this only in response to receiving an ACTION_SEND_BEGIN_MAIN_FRAME
// from NextAction.
@@ -208,6 +213,7 @@ class CC_EXPORT SchedulerStateMachine {
// Allow access of the can_start_ state in tests.
bool CanStartForTesting() const { return can_start_; }
+ // Indicates production should be skipped to recover latency.
void SetSkipNextBeginMainFrameToReduceLatency();
// Indicates whether drawing would, at this time, make sense.
@@ -333,7 +339,6 @@ class CC_EXPORT SchedulerStateMachine {
bool did_create_and_initialize_first_output_surface_;
bool impl_latency_takes_priority_;
bool skip_next_begin_main_frame_to_reduce_latency_;
- bool skip_begin_main_frame_to_reduce_latency_;
bool continuous_painting_;
bool children_need_begin_frames_;
bool defer_commits_;

Powered by Google App Engine
This is Rietveld 408576698