Index: cc/trees/layer_tree_host_impl.cc |
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc |
index db4d26304d5db2e186d6bd0a4c2ab87ec37bbad6..fb7dbffa07d8ec0e708a1b0ded4025525d14c3b3 100644 |
--- a/cc/trees/layer_tree_host_impl.cc |
+++ b/cc/trees/layer_tree_host_impl.cc |
@@ -3374,6 +3374,10 @@ void LayerTreeHostImpl::ScrollAnimationCreate( |
LayerImpl* layer_impl, |
const gfx::ScrollOffset& target_offset, |
const gfx::ScrollOffset& current_offset) { |
+ if (animation_host_) |
+ return animation_host_->ImplOnlyScrollAnimationCreate( |
+ layer_impl->id(), target_offset, current_offset); |
+ |
scoped_ptr<ScrollOffsetAnimationCurve> curve = |
ScrollOffsetAnimationCurve::Create(target_offset, |
EaseInOutTimingFunction::Create()); |
@@ -3390,6 +3394,11 @@ void LayerTreeHostImpl::ScrollAnimationCreate( |
bool LayerTreeHostImpl::ScrollAnimationUpdateTarget( |
LayerImpl* layer_impl, |
const gfx::Vector2dF& scroll_delta) { |
+ if (animation_host_) |
+ return animation_host_->ImplOnlyScrollAnimationUpdateTarget( |
+ layer_impl->id(), scroll_delta, layer_impl->MaxScrollOffset(), |
+ CurrentBeginFrameArgs().frame_time); |
+ |
Animation* animation = |
layer_impl->layer_animation_controller() |
? layer_impl->layer_animation_controller()->GetAnimation( |
@@ -3524,4 +3533,19 @@ void LayerTreeHostImpl::SetLayerScrollOffsetMutated( |
} |
} |
+void LayerTreeHostImpl::ScrollOffsetAnimationFinished() { |
+ ScrollEnd(); |
+} |
+ |
+gfx::ScrollOffset LayerTreeHostImpl::GetScrollOffsetForAnimation( |
+ int layer_id) const { |
+ if (active_tree()) { |
+ LayerAnimationValueProvider* layer = active_tree()->LayerById(layer_id); |
+ if (layer) |
+ return layer->ScrollOffsetForAnimation(); |
+ } |
+ |
+ return gfx::ScrollOffset(); |
+} |
+ |
} // namespace cc |