| 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 1755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1766 // Now that we've synced everything from the pending tree to the active | 1766 // Now that we've synced everything from the pending tree to the active |
| 1767 // tree, rename the pending tree the recycle tree so we can reuse it on the | 1767 // tree, rename the pending tree the recycle tree so we can reuse it on the |
| 1768 // next sync. | 1768 // next sync. |
| 1769 DCHECK(!recycle_tree_); | 1769 DCHECK(!recycle_tree_); |
| 1770 pending_tree_.swap(recycle_tree_); | 1770 pending_tree_.swap(recycle_tree_); |
| 1771 | 1771 |
| 1772 active_tree_->SetRootLayerScrollOffsetDelegate( | 1772 active_tree_->SetRootLayerScrollOffsetDelegate( |
| 1773 root_layer_scroll_offset_delegate_); | 1773 root_layer_scroll_offset_delegate_); |
| 1774 | 1774 |
| 1775 if (top_controls_manager_) { | 1775 if (top_controls_manager_) { |
| 1776 top_controls_manager_->SetTopControlsHeight( | 1776 // The order here should be kept in order to prevent top controls from |
| 1777 active_tree_->top_controls_height()); | 1777 // showing in the hidden state. |
| 1778 top_controls_manager_->SetControlsTopOffset( | 1778 top_controls_manager_->SetControlsTopOffset( |
| 1779 active_tree_->total_top_controls_content_offset() - | 1779 active_tree_->total_top_controls_content_offset() - |
| 1780 active_tree_->top_controls_height()); | 1780 active_tree_->top_controls_height()); |
| 1781 top_controls_manager_->SetTopControlsHeight( |
| 1782 active_tree_->top_controls_height()); |
| 1781 } | 1783 } |
| 1782 | 1784 |
| 1783 UpdateViewportContainerSizes(); | 1785 UpdateViewportContainerSizes(); |
| 1784 } else { | 1786 } else { |
| 1785 active_tree_->ProcessUIResourceRequestQueue(); | 1787 active_tree_->ProcessUIResourceRequestQueue(); |
| 1786 } | 1788 } |
| 1787 | 1789 |
| 1788 active_tree_->DidBecomeActive(); | 1790 active_tree_->DidBecomeActive(); |
| 1789 ActivateAnimations(); | 1791 ActivateAnimations(); |
| 1790 if (settings_.impl_side_painting) { | 1792 if (settings_.impl_side_painting) { |
| (...skipping 1667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3458 } | 3460 } |
| 3459 | 3461 |
| 3460 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { | 3462 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { |
| 3461 std::vector<PictureLayerImpl*>::iterator it = | 3463 std::vector<PictureLayerImpl*>::iterator it = |
| 3462 std::find(picture_layers_.begin(), picture_layers_.end(), layer); | 3464 std::find(picture_layers_.begin(), picture_layers_.end(), layer); |
| 3463 DCHECK(it != picture_layers_.end()); | 3465 DCHECK(it != picture_layers_.end()); |
| 3464 picture_layers_.erase(it); | 3466 picture_layers_.erase(it); |
| 3465 } | 3467 } |
| 3466 | 3468 |
| 3467 } // namespace cc | 3469 } // namespace cc |
| OLD | NEW |