OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "cc/trees/layer_tree_host_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 3081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3092 gfx::ScrollOffset next_scroll = gfx::ScrollOffset( | 3092 gfx::ScrollOffset next_scroll = gfx::ScrollOffset( |
3093 page_scale_animation_->ScrollOffsetAtTime(monotonic_time)); | 3093 page_scale_animation_->ScrollOffsetAtTime(monotonic_time)); |
3094 | 3094 |
3095 ScrollViewportInnerFirst(next_scroll.DeltaFrom(scroll_total)); | 3095 ScrollViewportInnerFirst(next_scroll.DeltaFrom(scroll_total)); |
3096 SetNeedsRedraw(); | 3096 SetNeedsRedraw(); |
3097 | 3097 |
3098 if (page_scale_animation_->IsAnimationCompleteAtTime(monotonic_time)) { | 3098 if (page_scale_animation_->IsAnimationCompleteAtTime(monotonic_time)) { |
3099 page_scale_animation_ = nullptr; | 3099 page_scale_animation_ = nullptr; |
3100 client_->SetNeedsCommitOnImplThread(); | 3100 client_->SetNeedsCommitOnImplThread(); |
3101 client_->RenewTreePriority(); | 3101 client_->RenewTreePriority(); |
| 3102 client_->DidCompletePageScaleAnimationOnImplThread(); |
3102 } else { | 3103 } else { |
3103 SetNeedsAnimate(); | 3104 SetNeedsAnimate(); |
3104 } | 3105 } |
3105 } | 3106 } |
3106 | 3107 |
3107 void LayerTreeHostImpl::AnimateTopControls(base::TimeTicks time) { | 3108 void LayerTreeHostImpl::AnimateTopControls(base::TimeTicks time) { |
3108 if (!top_controls_manager_ || !top_controls_manager_->animation()) | 3109 if (!top_controls_manager_ || !top_controls_manager_->animation()) |
3109 return; | 3110 return; |
3110 | 3111 |
3111 gfx::Vector2dF scroll = top_controls_manager_->Animate(time); | 3112 gfx::Vector2dF scroll = top_controls_manager_->Animate(time); |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3501 } | 3502 } |
3502 | 3503 |
3503 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { | 3504 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { |
3504 std::vector<PictureLayerImpl*>::iterator it = | 3505 std::vector<PictureLayerImpl*>::iterator it = |
3505 std::find(picture_layers_.begin(), picture_layers_.end(), layer); | 3506 std::find(picture_layers_.begin(), picture_layers_.end(), layer); |
3506 DCHECK(it != picture_layers_.end()); | 3507 DCHECK(it != picture_layers_.end()); |
3507 picture_layers_.erase(it); | 3508 picture_layers_.erase(it); |
3508 } | 3509 } |
3509 | 3510 |
3510 } // namespace cc | 3511 } // namespace cc |
OLD | NEW |