| 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 #include <map> | 9 #include <map> |
| 10 | 10 |
| (...skipping 2743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2754 | 2754 |
| 2755 void LayerTreeHostImpl::SetRootLayerScrollOffsetDelegate( | 2755 void LayerTreeHostImpl::SetRootLayerScrollOffsetDelegate( |
| 2756 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate) { | 2756 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate) { |
| 2757 root_layer_scroll_offset_delegate_ = root_layer_scroll_offset_delegate; | 2757 root_layer_scroll_offset_delegate_ = root_layer_scroll_offset_delegate; |
| 2758 active_tree_->SetRootLayerScrollOffsetDelegate( | 2758 active_tree_->SetRootLayerScrollOffsetDelegate( |
| 2759 root_layer_scroll_offset_delegate_); | 2759 root_layer_scroll_offset_delegate_); |
| 2760 } | 2760 } |
| 2761 | 2761 |
| 2762 void LayerTreeHostImpl::OnRootLayerDelegatedScrollOffsetChanged() { | 2762 void LayerTreeHostImpl::OnRootLayerDelegatedScrollOffsetChanged() { |
| 2763 DCHECK(root_layer_scroll_offset_delegate_); | 2763 DCHECK(root_layer_scroll_offset_delegate_); |
| 2764 active_tree_->DistributeRootScrollOffset(); |
| 2764 client_->SetNeedsCommitOnImplThread(); | 2765 client_->SetNeedsCommitOnImplThread(); |
| 2765 SetNeedsRedraw(); | 2766 SetNeedsRedraw(); |
| 2766 active_tree_->OnRootLayerDelegatedScrollOffsetChanged(); | |
| 2767 active_tree_->set_needs_update_draw_properties(); | 2767 active_tree_->set_needs_update_draw_properties(); |
| 2768 } | 2768 } |
| 2769 | 2769 |
| 2770 void LayerTreeHostImpl::ClearCurrentlyScrollingLayer() { | 2770 void LayerTreeHostImpl::ClearCurrentlyScrollingLayer() { |
| 2771 active_tree_->ClearCurrentlyScrollingLayer(); | 2771 active_tree_->ClearCurrentlyScrollingLayer(); |
| 2772 did_lock_scrolling_layer_ = false; | 2772 did_lock_scrolling_layer_ = false; |
| 2773 scroll_affects_scroll_handler_ = false; | 2773 scroll_affects_scroll_handler_ = false; |
| 2774 accumulated_root_overscroll_ = gfx::Vector2dF(); | 2774 accumulated_root_overscroll_ = gfx::Vector2dF(); |
| 2775 } | 2775 } |
| 2776 | 2776 |
| (...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3430 new_target.SetToMin(layer_impl->MaxScrollOffset()); | 3430 new_target.SetToMin(layer_impl->MaxScrollOffset()); |
| 3431 | 3431 |
| 3432 curve->UpdateTarget( | 3432 curve->UpdateTarget( |
| 3433 animation->TrimTimeToCurrentIteration(CurrentBeginFrameArgs().frame_time) | 3433 animation->TrimTimeToCurrentIteration(CurrentBeginFrameArgs().frame_time) |
| 3434 .InSecondsF(), | 3434 .InSecondsF(), |
| 3435 new_target); | 3435 new_target); |
| 3436 | 3436 |
| 3437 return true; | 3437 return true; |
| 3438 } | 3438 } |
| 3439 } // namespace cc | 3439 } // namespace cc |
| OLD | NEW |