| 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 3029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3040 gfx::ScrollOffset next_scroll = gfx::ScrollOffset( | 3040 gfx::ScrollOffset next_scroll = gfx::ScrollOffset( |
| 3041 page_scale_animation_->ScrollOffsetAtTime(monotonic_time)); | 3041 page_scale_animation_->ScrollOffsetAtTime(monotonic_time)); |
| 3042 | 3042 |
| 3043 ScrollViewportInnerFirst(next_scroll.DeltaFrom(scroll_total)); | 3043 ScrollViewportInnerFirst(next_scroll.DeltaFrom(scroll_total)); |
| 3044 SetNeedsRedraw(); | 3044 SetNeedsRedraw(); |
| 3045 | 3045 |
| 3046 if (page_scale_animation_->IsAnimationCompleteAtTime(monotonic_time)) { | 3046 if (page_scale_animation_->IsAnimationCompleteAtTime(monotonic_time)) { |
| 3047 page_scale_animation_ = nullptr; | 3047 page_scale_animation_ = nullptr; |
| 3048 client_->SetNeedsCommitOnImplThread(); | 3048 client_->SetNeedsCommitOnImplThread(); |
| 3049 client_->RenewTreePriority(); | 3049 client_->RenewTreePriority(); |
| 3050 client_->DidCompletePageScaleAnimationBeforeCommit(); |
| 3050 } else { | 3051 } else { |
| 3051 SetNeedsAnimate(); | 3052 SetNeedsAnimate(); |
| 3052 } | 3053 } |
| 3053 } | 3054 } |
| 3054 | 3055 |
| 3055 void LayerTreeHostImpl::AnimateTopControls(base::TimeTicks time) { | 3056 void LayerTreeHostImpl::AnimateTopControls(base::TimeTicks time) { |
| 3056 if (!top_controls_manager_ || !top_controls_manager_->animation()) | 3057 if (!top_controls_manager_ || !top_controls_manager_->animation()) |
| 3057 return; | 3058 return; |
| 3058 | 3059 |
| 3059 gfx::Vector2dF scroll = top_controls_manager_->Animate(time); | 3060 gfx::Vector2dF scroll = top_controls_manager_->Animate(time); |
| (...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3449 } | 3450 } |
| 3450 | 3451 |
| 3451 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { | 3452 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { |
| 3452 std::vector<PictureLayerImpl*>::iterator it = | 3453 std::vector<PictureLayerImpl*>::iterator it = |
| 3453 std::find(picture_layers_.begin(), picture_layers_.end(), layer); | 3454 std::find(picture_layers_.begin(), picture_layers_.end(), layer); |
| 3454 DCHECK(it != picture_layers_.end()); | 3455 DCHECK(it != picture_layers_.end()); |
| 3455 picture_layers_.erase(it); | 3456 picture_layers_.erase(it); |
| 3456 } | 3457 } |
| 3457 | 3458 |
| 3458 } // namespace cc | 3459 } // namespace cc |
| OLD | NEW |