Index: cc/animation/layer_animation_controller.h |
diff --git a/cc/animation/layer_animation_controller.h b/cc/animation/layer_animation_controller.h |
index d776ee9cbd7de72e27eca1722cf6dcfd75ca797a..48c3bdcaede9b1d330ec21beb0ae7cc1eafc289a 100644 |
--- a/cc/animation/layer_animation_controller.h |
+++ b/cc/animation/layer_animation_controller.h |
@@ -139,6 +139,17 @@ class CC_EXPORT LayerAnimationController |
// be computed. |
bool MaximumTargetScale(float* max_scale) const; |
+ // When a scroll animation is removed on the main thread, its compositor |
+ // thread counterpart continues producing scroll deltas until activation. |
+ // These scroll deltas need to be cleared at activation, so that the active |
+ // layer's scroll offset matches the offset provided by the main thread |
+ // rather than a combination of this offset and scroll deltas produced by |
+ // the removed animation. This is to provide the illusion of synchronicity to |
+ // JS that simultaneously removes an animation and sets the scroll offset. |
+ bool scroll_offset_animation_was_interrupted() const { |
+ return scroll_offset_animation_was_interrupted_; |
+ } |
+ |
bool needs_to_start_animations_for_testing() { |
return needs_to_start_animations_; |
} |
@@ -156,8 +167,7 @@ class CC_EXPORT LayerAnimationController |
LayerAnimationController* controller_impl) const; |
void RemoveAnimationsCompletedOnMainThread( |
LayerAnimationController* controller_impl) const; |
- void PushPropertiesToImplThread( |
- LayerAnimationController* controller_impl) const; |
+ void PushPropertiesToImplThread(LayerAnimationController* controller_impl); |
void StartAnimations(base::TimeTicks monotonic_time); |
void PromoteStartedAnimations(base::TimeTicks monotonic_time, |
@@ -191,8 +201,6 @@ class CC_EXPORT LayerAnimationController |
void NotifyObserversAnimationWaitingForDeletion(); |
- void NotifyObserversScrollOffsetAnimationRemoved(); |
- |
bool HasValueObserver(); |
bool HasActiveValueObserver(); |
@@ -216,6 +224,8 @@ class CC_EXPORT LayerAnimationController |
// previous attempt at starting animations failed to start all animations. |
bool needs_to_start_animations_; |
+ bool scroll_offset_animation_was_interrupted_; |
+ |
DISALLOW_COPY_AND_ASSIGN(LayerAnimationController); |
}; |