Index: cc/scheduler/scheduler_state_machine.h |
diff --git a/cc/scheduler/scheduler_state_machine.h b/cc/scheduler/scheduler_state_machine.h |
index 101b36d312ddceb74984274465a919dbbf5db25e..0a9596a3e79ff20ec4c2c231ebc080771874e6ae 100644 |
--- a/cc/scheduler/scheduler_state_machine.h |
+++ b/cc/scheduler/scheduler_state_machine.h |
@@ -73,7 +73,7 @@ class CC_EXPORT SchedulerStateMachine { |
ACTION_SEND_BEGIN_FRAME_TO_MAIN_THREAD, |
ACTION_COMMIT, |
ACTION_UPDATE_VISIBLE_TILES, |
- ACTION_ACTIVATE_PENDING_TREE_IF_NEEDED, |
+ ACTION_ACTIVATE_PENDING_TREE, |
ACTION_DRAW_IF_POSSIBLE, |
ACTION_DRAW_FORCED, |
ACTION_DRAW_AND_SWAP_ABORT, |
@@ -153,6 +153,9 @@ class CC_EXPORT SchedulerStateMachine { |
// when such behavior would be undesirable. |
void SetCanDraw(bool can); |
+ // Indicates that the pending tree is ready for activation. |
+ void NotifyReadyToActivate(); |
+ |
// Indicates whether or not there is a pending tree. This influences |
// whether or not we can succesfully commit at this time. If the |
// last commit is still being processed (but not blocking), it may not |
@@ -172,15 +175,18 @@ class CC_EXPORT SchedulerStateMachine { |
bool PendingDrawsShouldBeAborted() const; |
protected: |
+ // True if we need to force activations to make forward progress. |
+ bool PendingActivationsShouldBeForced() const; |
+ |
bool ShouldDrawForced() const; |
bool ShouldDraw() const; |
- bool ShouldAttemptTreeActivation() const; |
+ bool ShouldActivatePendingTree() const; |
bool ShouldAcquireLayerTexturesForMainThread() const; |
bool ShouldUpdateVisibleTiles() const; |
bool ShouldSendBeginFrameToMainThread() const; |
bool HasDrawnThisFrame() const; |
- bool HasAttemptedTreeActivationThisFrame() const; |
+ bool HasActivatedPendingTreeThisFrame() const; |
bool HasUpdatedVisibleTilesThisFrame() const; |
bool HasSentBeginFrameToMainThreadThisFrame() const; |
@@ -196,7 +202,6 @@ class CC_EXPORT SchedulerStateMachine { |
int current_frame_number_; |
int last_frame_number_where_begin_frame_sent_to_main_thread_; |
int last_frame_number_where_draw_was_called_; |
- int last_frame_number_where_tree_activation_attempted_; |
int last_frame_number_where_update_visible_tiles_was_called_; |
int consecutive_failed_draws_; |
int maximum_number_of_failed_draws_before_draw_is_forced_; |
@@ -214,6 +219,9 @@ class CC_EXPORT SchedulerStateMachine { |
bool can_start_; |
bool can_draw_; |
bool has_pending_tree_; |
+ bool pending_tree_is_ready_for_activation_; |
+ bool has_active_tree_; |
+ bool active_tree_has_been_drawn_; |
bool draw_if_possible_failed_; |
TextureState texture_state_; |
bool did_create_and_initialize_first_output_surface_; |