Index: cc/scheduler/scheduler_state_machine.cc |
diff --git a/cc/scheduler/scheduler_state_machine.cc b/cc/scheduler/scheduler_state_machine.cc |
index 3bd7610fc97defa58648986cc11289845ba04709..a6904ae2c6781341ced4067120f2089a43d740f1 100644 |
--- a/cc/scheduler/scheduler_state_machine.cc |
+++ b/cc/scheduler/scheduler_state_machine.cc |
@@ -43,7 +43,6 @@ |
has_pending_tree_(false), |
pending_tree_is_ready_for_activation_(false), |
active_tree_needs_first_draw_(false), |
- did_commit_after_animating_(false), |
did_create_and_initialize_first_output_surface_(false), |
impl_latency_takes_priority_(false), |
skip_next_begin_main_frame_to_reduce_latency_(false), |
@@ -226,7 +225,6 @@ |
pending_tree_is_ready_for_activation_); |
state->SetBoolean("active_tree_needs_first_draw", |
active_tree_needs_first_draw_); |
- state->SetBoolean("did_commit_after_animating", did_commit_after_animating_); |
state->SetBoolean("did_create_and_initialize_first_output_surface", |
did_create_and_initialize_first_output_surface_); |
state->SetBoolean("impl_latency_takes_priority", |
@@ -253,10 +251,6 @@ |
skip_next_begin_main_frame_to_reduce_latency_ = false; |
} |
-bool SchedulerStateMachine::HasAnimatedThisFrame() const { |
- return last_frame_number_animate_performed_ == current_frame_number_; |
-} |
- |
bool SchedulerStateMachine::HasSentBeginMainFrameThisFrame() const { |
return current_frame_number_ == |
last_frame_number_begin_main_frame_sent_; |
@@ -347,11 +341,6 @@ |
if (PendingDrawsShouldBeAborted()) |
return active_tree_needs_first_draw_; |
- // If a commit has occurred after the animate call, we need to call animate |
- // again before we should draw. |
- if (did_commit_after_animating_) |
- return false; |
- |
// After this line, we only want to send a swap request once per frame. |
if (HasRequestedSwapThisFrame()) |
return false; |
@@ -423,8 +412,7 @@ |
if (!can_draw_) |
return false; |
- // If a commit occurred after our last call, we need to do animation again. |
- if (HasAnimatedThisFrame() && !did_commit_after_animating_) |
+ if (last_frame_number_animate_performed_ == current_frame_number_) |
return false; |
if (begin_impl_frame_state_ != BEGIN_IMPL_FRAME_STATE_BEGIN_FRAME_STARTING && |
@@ -576,7 +564,6 @@ |
case ACTION_ANIMATE: |
last_frame_number_animate_performed_ = current_frame_number_; |
needs_animate_ = false; |
- did_commit_after_animating_ = false; |
// TODO(skyostil): Instead of assuming this, require the client to tell |
// us. |
SetNeedsRedraw(); |
@@ -631,9 +618,6 @@ |
void SchedulerStateMachine::UpdateStateOnCommit(bool commit_was_aborted) { |
commit_count_++; |
- |
- if (!commit_was_aborted && HasAnimatedThisFrame()) |
- did_commit_after_animating_ = true; |
if (commit_was_aborted || settings_.main_frame_before_activation_enabled) { |
commit_state_ = COMMIT_STATE_IDLE; |