| Index: cc/trees/layer_tree_impl.cc
|
| diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
|
| index c005a1821614499203bbcdb488a40e4e595698c2..c55827903a472383a0a7e30a7d5e0cf3fbd9bd9a 100644
|
| --- a/cc/trees/layer_tree_impl.cc
|
| +++ b/cc/trees/layer_tree_impl.cc
|
| @@ -221,7 +221,8 @@ void LayerTreeImpl::PushPropertiesTo(LayerTreeImpl* target_tree) {
|
| target_tree->page_scale_delta() / target_tree->sent_page_scale_delta());
|
| target_tree->set_sent_page_scale_delta(1);
|
|
|
| - target_tree->page_scale_animation_ = page_scale_animation_.Pass();
|
| + target_tree->pending_page_scale_animation_ =
|
| + pending_page_scale_animation_.Pass();
|
|
|
| if (page_scale_layer_ && inner_viewport_scroll_layer_) {
|
| target_tree->SetViewportLayersFromIds(
|
| @@ -1480,45 +1481,14 @@ BlockingTaskRunner* LayerTreeImpl::BlockingMainThreadTaskRunner() const {
|
| return proxy()->blocking_main_thread_task_runner();
|
| }
|
|
|
| -void LayerTreeImpl::SetPageScaleAnimation(
|
| - const gfx::Vector2d& target_offset,
|
| - bool anchor_point,
|
| - float page_scale,
|
| - base::TimeDelta duration) {
|
| - if (!InnerViewportScrollLayer())
|
| - return;
|
| -
|
| - gfx::ScrollOffset scroll_total = TotalScrollOffset();
|
| - gfx::SizeF scaled_scrollable_size = ScrollableSize();
|
| - gfx::SizeF viewport_size = InnerViewportContainerLayer()->bounds();
|
| -
|
| - // Easing constants experimentally determined.
|
| - scoped_ptr<TimingFunction> timing_function =
|
| - CubicBezierTimingFunction::Create(.8, 0, .3, .9);
|
| -
|
| - // TODO(miletus) : Pass in ScrollOffset.
|
| - page_scale_animation_ =
|
| - PageScaleAnimation::Create(ScrollOffsetToVector2dF(scroll_total),
|
| - total_page_scale_factor(),
|
| - viewport_size,
|
| - scaled_scrollable_size,
|
| - timing_function.Pass());
|
| -
|
| - if (anchor_point) {
|
| - gfx::Vector2dF anchor(target_offset);
|
| - page_scale_animation_->ZoomWithAnchor(anchor,
|
| - page_scale,
|
| - duration.InSecondsF());
|
| - } else {
|
| - gfx::Vector2dF scaled_target_offset = target_offset;
|
| - page_scale_animation_->ZoomTo(scaled_target_offset,
|
| - page_scale,
|
| - duration.InSecondsF());
|
| - }
|
| +void LayerTreeImpl::SetPendingPageScaleAnimation(
|
| + scoped_ptr<PendingPageScaleAnimation> pending_animation) {
|
| + pending_page_scale_animation_ = pending_animation.Pass();
|
| }
|
|
|
| -scoped_ptr<PageScaleAnimation> LayerTreeImpl::TakePageScaleAnimation() {
|
| - return page_scale_animation_.Pass();
|
| +scoped_ptr<PendingPageScaleAnimation>
|
| + LayerTreeImpl::TakePendingPageScaleAnimation() {
|
| + return pending_page_scale_animation_.Pass();
|
| }
|
|
|
| } // namespace cc
|
|
|