| 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 3088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3099 gfx::ScrollOffset next_scroll = gfx::ScrollOffset( | 3099 gfx::ScrollOffset next_scroll = gfx::ScrollOffset( |
| 3100 page_scale_animation_->ScrollOffsetAtTime(monotonic_time)); | 3100 page_scale_animation_->ScrollOffsetAtTime(monotonic_time)); |
| 3101 | 3101 |
| 3102 ScrollViewportInnerFirst(next_scroll.DeltaFrom(scroll_total)); | 3102 ScrollViewportInnerFirst(next_scroll.DeltaFrom(scroll_total)); |
| 3103 SetNeedsRedraw(); | 3103 SetNeedsRedraw(); |
| 3104 | 3104 |
| 3105 if (page_scale_animation_->IsAnimationCompleteAtTime(monotonic_time)) { | 3105 if (page_scale_animation_->IsAnimationCompleteAtTime(monotonic_time)) { |
| 3106 page_scale_animation_ = nullptr; | 3106 page_scale_animation_ = nullptr; |
| 3107 client_->SetNeedsCommitOnImplThread(); | 3107 client_->SetNeedsCommitOnImplThread(); |
| 3108 client_->RenewTreePriority(); | 3108 client_->RenewTreePriority(); |
| 3109 client_->DidCompletePageScaleAnimationOnImplThread(); |
| 3109 } else { | 3110 } else { |
| 3110 SetNeedsAnimate(); | 3111 SetNeedsAnimate(); |
| 3111 } | 3112 } |
| 3112 } | 3113 } |
| 3113 | 3114 |
| 3114 void LayerTreeHostImpl::AnimateTopControls(base::TimeTicks time) { | 3115 void LayerTreeHostImpl::AnimateTopControls(base::TimeTicks time) { |
| 3115 if (!top_controls_manager_ || !top_controls_manager_->animation()) | 3116 if (!top_controls_manager_ || !top_controls_manager_->animation()) |
| 3116 return; | 3117 return; |
| 3117 | 3118 |
| 3118 gfx::Vector2dF scroll = top_controls_manager_->Animate(time); | 3119 gfx::Vector2dF scroll = top_controls_manager_->Animate(time); |
| (...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3508 } | 3509 } |
| 3509 | 3510 |
| 3510 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { | 3511 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { |
| 3511 std::vector<PictureLayerImpl*>::iterator it = | 3512 std::vector<PictureLayerImpl*>::iterator it = |
| 3512 std::find(picture_layers_.begin(), picture_layers_.end(), layer); | 3513 std::find(picture_layers_.begin(), picture_layers_.end(), layer); |
| 3513 DCHECK(it != picture_layers_.end()); | 3514 DCHECK(it != picture_layers_.end()); |
| 3514 picture_layers_.erase(it); | 3515 picture_layers_.erase(it); |
| 3515 } | 3516 } |
| 3516 | 3517 |
| 3517 } // namespace cc | 3518 } // namespace cc |
| OLD | NEW |