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