Index: cc/scheduler/scheduler_state_machine.h |
diff --git a/cc/scheduler/scheduler_state_machine.h b/cc/scheduler/scheduler_state_machine.h |
index f77df28b783d5ff3f8d411221cdef6823b66904f..04384423a14584f055bd90cfffa53781d1ee5013 100644 |
--- a/cc/scheduler/scheduler_state_machine.h |
+++ b/cc/scheduler/scheduler_state_machine.h |
@@ -64,7 +64,8 @@ class CC_EXPORT SchedulerStateMachine { |
static const char* BeginImplFrameStateToString(BeginImplFrameState state); |
enum BeginImplFrameDeadlineMode { |
- BEGIN_IMPL_FRAME_DEADLINE_MODE_IMMEDIATE, |
+ BEGIN_IMPL_FRAME_DEADLINE_MODE_IMMEDIATE_SYNCHRONOUS, |
+ BEGIN_IMPL_FRAME_DEADLINE_MODE_IMMEDIATE_ASYNCHRONOUS, |
BEGIN_IMPL_FRAME_DEADLINE_MODE_REGULAR, |
BEGIN_IMPL_FRAME_DEADLINE_MODE_LATE, |
}; |
@@ -111,6 +112,7 @@ class CC_EXPORT SchedulerStateMachine { |
ACTION_DRAW_AND_SWAP_ABORT, |
ACTION_BEGIN_OUTPUT_SURFACE_CREATION, |
ACTION_PREPARE_TILES, |
+ ACTION_INVALIDATE_OUTPUT_SURFACE, |
}; |
static const char* ActionToString(Action action); |
@@ -129,12 +131,6 @@ class CC_EXPORT SchedulerStateMachine { |
// SetNeedsBeginFrames(BeginFrameNeeded()) on the frame source. |
bool ShouldSetNeedsBeginFrames(bool frame_source_needs_begin_frames) const; |
- // Indicates that we need to independently poll for new state and actions |
- // because we can't expect a BeginImplFrame. This is mostly used to avoid |
- // drawing repeat frames with the synchronous compositor without dropping |
- // necessary actions on the floor. |
- bool ShouldPollForAnticipatedDrawTriggers() const; |
- |
// Indicates that the system has entered and left a BeginImplFrame callback. |
// The scheduler will not draw more than once in a given BeginImplFrame |
// callback nor send more than one BeginMainFrame message. |
@@ -151,15 +147,6 @@ class CC_EXPORT SchedulerStateMachine { |
// impl thread to draw, it is in a high latency mode. |
bool MainThreadIsInHighLatencyMode() const; |
- // PollForAnticipatedDrawTriggers is used by the synchronous compositor to |
- // avoid requesting BeginImplFrames when we won't actually draw but still |
- // need to advance our state at vsync intervals. |
- void DidEnterPollForAnticipatedDrawTriggers(); |
- void DidLeavePollForAnticipatedDrawTriggers(); |
- bool inside_poll_for_anticipated_draw_triggers() const { |
- return inside_poll_for_anticipated_draw_triggers_; |
- } |
- |
// Indicates whether the LayerTreeHostImpl is visible. |
void SetVisible(bool visible); |
bool visible() const { return visible_; } |
@@ -246,8 +233,6 @@ class CC_EXPORT SchedulerStateMachine { |
// True if we need to abort draws to make forward progress. |
bool PendingDrawsShouldBeAborted() const; |
- bool SupportsProactiveBeginFrame() const; |
- |
void SetContinuousPainting(bool continuous_painting) { |
continuous_painting_ = continuous_painting; |
} |
@@ -288,12 +273,14 @@ class CC_EXPORT SchedulerStateMachine { |
bool ShouldSendBeginMainFrame() const; |
bool ShouldCommit() const; |
bool ShouldPrepareTiles() const; |
+ bool ShouldInvalidateOutputSurface() const; |
- void AdvanceCurrentFrameNumber(); |
+ void AdvanceFrame(); |
bool HasAnimatedThisFrame() const; |
bool HasSentBeginMainFrameThisFrame() const; |
bool HasRequestedSwapThisFrame() const; |
bool HasSwappedThisFrame() const; |
+ bool HasInvalidatedOutputSurfaceThisFrame() const; |
void UpdateStateOnCommit(bool commit_had_no_updates); |
void UpdateStateOnActivation(); |
@@ -315,6 +302,7 @@ class CC_EXPORT SchedulerStateMachine { |
int last_frame_number_swap_performed_; |
int last_frame_number_swap_requested_; |
int last_frame_number_begin_main_frame_sent_; |
+ int last_frame_number_invalidate_output_surface_performed_; |
// prepare_tiles_funnel_ is "filled" each time PrepareTiles is called |
// and "drained" on each BeginImplFrame. If the funnel gets too full, |
@@ -328,7 +316,6 @@ class CC_EXPORT SchedulerStateMachine { |
bool needs_animate_; |
bool needs_prepare_tiles_; |
bool needs_commit_; |
- bool inside_poll_for_anticipated_draw_triggers_; |
bool visible_; |
bool can_start_; |
bool can_draw_; |