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

Unified Diff: cc/scheduler/scheduler_state_machine.h

Issue 130483010: cc: Limit ManageTiles calls to once per-frame on average (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add tests Created 6 years, 11 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 | « no previous file | 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 2e61224fb284eb9933005a9cd9822227e98d626b..069384bdcccd4585a29e107c1e6f3ee5c3841b3a 100644
--- a/cc/scheduler/scheduler_state_machine.h
+++ b/cc/scheduler/scheduler_state_machine.h
@@ -254,6 +254,7 @@ class CC_EXPORT SchedulerStateMachine {
bool ShouldCommit() const;
bool ShouldManageTiles() const;
+ void AdvanceCurrentFrameNumber();
bool HasSentBeginMainFrameThisFrame() const;
bool HasScheduledManageTilesThisFrame() const;
bool HasUpdatedVisibleTilesThisFrame() const;
@@ -280,8 +281,12 @@ class CC_EXPORT SchedulerStateMachine {
int last_frame_number_swap_performed_;
int last_frame_number_begin_main_frame_sent_;
int last_frame_number_update_visible_tiles_was_called_;
- int last_frame_number_manage_tiles_called_;
+ // manage_tiles_funnel_ is "filled" each time ManageTiles is called
+ // and "drained" on each BeginImplFrame. If the funnel gets too full,
+ // we start throttling ACTION_MANAGE_TILES such that we average one
+ // ManageTile per BeginImplFrame.
+ int manage_tiles_funnel_;
int consecutive_failed_draws_;
bool needs_redraw_;
bool needs_manage_tiles_;
« no previous file with comments | « no previous file | cc/scheduler/scheduler_state_machine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698