Index: cc/scheduler/scheduler_state_machine.h |
diff --git a/cc/scheduler/scheduler_state_machine.h b/cc/scheduler/scheduler_state_machine.h |
index 277926471a3feaa4b4f6c7c7e1833ddcce5c0bd8..e7d05e62ab9b1c18f3ad14a5bf3f8b11881eb2bc 100644 |
--- a/cc/scheduler/scheduler_state_machine.h |
+++ b/cc/scheduler/scheduler_state_machine.h |
@@ -101,6 +101,7 @@ class CC_EXPORT SchedulerStateMachine { |
enum Action { |
ACTION_NONE, |
+ ACTION_ANIMATE, |
ACTION_SEND_BEGIN_MAIN_FRAME, |
ACTION_COMMIT, |
ACTION_UPDATE_VISIBLE_TILES, |
@@ -164,6 +165,9 @@ class CC_EXPORT SchedulerStateMachine { |
void SetNeedsRedraw(); |
bool needs_redraw() const { return needs_redraw_; } |
+ void SetNeedsAnimate(); |
+ bool needs_animate() const { return needs_animate_; } |
+ |
// Indicates that manage-tiles is required. This guarantees another |
// ManageTiles will occur shortly (even if no redraw is required). |
void SetNeedsManageTiles(); |
@@ -248,12 +252,13 @@ class CC_EXPORT SchedulerStateMachine { |
} |
protected: |
- bool BeginFrameNeededToDraw() const; |
+ bool BeginFrameNeededToAnimateOrDraw() const; |
bool ProactiveBeginFrameWanted() const; |
// True if we need to force activations to make forward progress. |
bool PendingActivationsShouldBeForced() const; |
+ bool ShouldAnimate() const; |
bool ShouldBeginOutputSurfaceCreation() const; |
bool ShouldDrawForced() const; |
bool ShouldDraw() const; |
@@ -286,6 +291,7 @@ class CC_EXPORT SchedulerStateMachine { |
int commit_count_; |
int current_frame_number_; |
+ int last_frame_number_animate_performed_; |
int last_frame_number_swap_performed_; |
int last_frame_number_begin_main_frame_sent_; |
int last_frame_number_update_visible_tiles_was_called_; |
@@ -299,6 +305,7 @@ class CC_EXPORT SchedulerStateMachine { |
int max_pending_swaps_; |
int pending_swaps_; |
bool needs_redraw_; |
+ bool needs_animate_; |
bool needs_manage_tiles_; |
bool swap_used_incomplete_tile_; |
bool needs_commit_; |