Index: cc/scheduler/scheduler_state_machine.h |
diff --git a/cc/scheduler/scheduler_state_machine.h b/cc/scheduler/scheduler_state_machine.h |
index aaefa37bc67bad6c2634d8b62a3c44bd59a64c57..c280dbf2d0b9426d52ea688faa168d21d977d1d4 100644 |
--- a/cc/scheduler/scheduler_state_machine.h |
+++ b/cc/scheduler/scheduler_state_machine.h |
@@ -100,6 +100,7 @@ class CC_EXPORT SchedulerStateMachine { |
ACTION_DRAW_AND_READBACK, |
ACTION_BEGIN_OUTPUT_SURFACE_CREATION, |
ACTION_ACQUIRE_LAYER_TEXTURES_FOR_MAIN_THREAD, |
+ ACTION_MANAGE_TILES, |
}; |
static const char* ActionToString(Action action); |
@@ -128,6 +129,10 @@ class CC_EXPORT SchedulerStateMachine { |
// or the screen being damaged and simply needing redisplay. |
void SetNeedsRedraw(); |
+ // Indicates that manage-tiles is required. This guarantees another |
+ // ManageTiles will occur shortly (even if no redraw is required). |
+ void SetNeedsManageTiles(); |
+ |
// Indicates whether a redraw is required because we are currently rendering |
// with a low resolution or checkerboarded tile. |
void SetSwapUsedIncompleteTile(bool used_incomplete_tile); |
@@ -197,6 +202,7 @@ class CC_EXPORT SchedulerStateMachine { |
bool ShouldUpdateVisibleTiles() const; |
bool ShouldSendBeginFrameToMainThread() const; |
bool ShouldCommit() const; |
+ bool ShouldManageTiles() const; |
bool HasDrawnAndSwappedThisFrame() const; |
bool HasActivatedPendingTreeThisFrame() const; |
@@ -206,6 +212,7 @@ class CC_EXPORT SchedulerStateMachine { |
void UpdateStateOnCommit(bool commit_was_aborted); |
void UpdateStateOnActivation(); |
void UpdateStateOnDraw(bool did_swap); |
+ void UpdateStateOnManageTiles(); |
const SchedulerSettings settings_; |
@@ -222,6 +229,7 @@ class CC_EXPORT SchedulerStateMachine { |
int last_frame_number_where_update_visible_tiles_was_called_; |
int consecutive_failed_draws_; |
bool needs_redraw_; |
+ bool needs_manage_tiles_; |
bool swap_used_incomplete_tile_; |
bool needs_commit_; |
bool main_thread_needs_layer_textures_; |