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 3057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3068 gfx::ScrollOffset next_scroll = gfx::ScrollOffset( | 3068 gfx::ScrollOffset next_scroll = gfx::ScrollOffset( |
3069 page_scale_animation_->ScrollOffsetAtTime(monotonic_time)); | 3069 page_scale_animation_->ScrollOffsetAtTime(monotonic_time)); |
3070 | 3070 |
3071 ScrollViewportInnerFirst(next_scroll.DeltaFrom(scroll_total)); | 3071 ScrollViewportInnerFirst(next_scroll.DeltaFrom(scroll_total)); |
3072 SetNeedsRedraw(); | 3072 SetNeedsRedraw(); |
3073 | 3073 |
3074 if (page_scale_animation_->IsAnimationCompleteAtTime(monotonic_time)) { | 3074 if (page_scale_animation_->IsAnimationCompleteAtTime(monotonic_time)) { |
3075 page_scale_animation_ = nullptr; | 3075 page_scale_animation_ = nullptr; |
3076 client_->SetNeedsCommitOnImplThread(); | 3076 client_->SetNeedsCommitOnImplThread(); |
3077 client_->RenewTreePriority(); | 3077 client_->RenewTreePriority(); |
| 3078 client_->DidCompletePageScaleAnimationOnImplThread(); |
3078 } else { | 3079 } else { |
3079 SetNeedsAnimate(); | 3080 SetNeedsAnimate(); |
3080 } | 3081 } |
3081 } | 3082 } |
3082 | 3083 |
3083 void LayerTreeHostImpl::AnimateTopControls(base::TimeTicks time) { | 3084 void LayerTreeHostImpl::AnimateTopControls(base::TimeTicks time) { |
3084 if (!top_controls_manager_ || !top_controls_manager_->animation()) | 3085 if (!top_controls_manager_ || !top_controls_manager_->animation()) |
3085 return; | 3086 return; |
3086 | 3087 |
3087 gfx::Vector2dF scroll = top_controls_manager_->Animate(time); | 3088 gfx::Vector2dF scroll = top_controls_manager_->Animate(time); |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3477 } | 3478 } |
3478 | 3479 |
3479 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { | 3480 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { |
3480 std::vector<PictureLayerImpl*>::iterator it = | 3481 std::vector<PictureLayerImpl*>::iterator it = |
3481 std::find(picture_layers_.begin(), picture_layers_.end(), layer); | 3482 std::find(picture_layers_.begin(), picture_layers_.end(), layer); |
3482 DCHECK(it != picture_layers_.end()); | 3483 DCHECK(it != picture_layers_.end()); |
3483 picture_layers_.erase(it); | 3484 picture_layers_.erase(it); |
3484 } | 3485 } |
3485 | 3486 |
3486 } // namespace cc | 3487 } // namespace cc |
OLD | NEW |