| 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_impl.h" | 5 #include "cc/trees/layer_tree_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 1689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1700 if (scrollbar_layer->orientation() == HORIZONTAL) { | 1700 if (scrollbar_layer->orientation() == HORIZONTAL) { |
| 1701 DCHECK_EQ(scrollbar_ids.horizontal, Layer::INVALID_ID) | 1701 DCHECK_EQ(scrollbar_ids.horizontal, Layer::INVALID_ID) |
| 1702 << "Existing scrollbar should have been unregistered."; | 1702 << "Existing scrollbar should have been unregistered."; |
| 1703 scrollbar_ids.horizontal = scrollbar_layer->id(); | 1703 scrollbar_ids.horizontal = scrollbar_layer->id(); |
| 1704 } else { | 1704 } else { |
| 1705 DCHECK_EQ(scrollbar_ids.vertical, Layer::INVALID_ID) | 1705 DCHECK_EQ(scrollbar_ids.vertical, Layer::INVALID_ID) |
| 1706 << "Existing scrollbar should have been unregistered."; | 1706 << "Existing scrollbar should have been unregistered."; |
| 1707 scrollbar_ids.vertical = scrollbar_layer->id(); | 1707 scrollbar_ids.vertical = scrollbar_layer->id(); |
| 1708 } | 1708 } |
| 1709 | 1709 |
| 1710 if (IsActiveTree() && scrollbar_layer->is_overlay_scrollbar()) { | 1710 if (IsActiveTree() && scrollbar_layer->is_overlay_scrollbar() && |
| 1711 scrollbar_layer->GetScrollbarAnimator() != |
| 1712 LayerTreeSettings::NO_ANIMATOR) { |
| 1711 layer_tree_host_impl_->RegisterScrollbarAnimationController( | 1713 layer_tree_host_impl_->RegisterScrollbarAnimationController( |
| 1712 scroll_element_id, scrollbar_layer->Opacity()); | 1714 scroll_element_id, scrollbar_layer->Opacity()); |
| 1713 } | 1715 } |
| 1714 | 1716 |
| 1715 // The new scrollbar's geometries need to be initialized. | 1717 // The new scrollbar's geometries need to be initialized. |
| 1716 SetScrollbarGeometriesNeedUpdate(); | 1718 SetScrollbarGeometriesNeedUpdate(); |
| 1717 } | 1719 } |
| 1718 | 1720 |
| 1719 void LayerTreeImpl::UnregisterScrollbar( | 1721 void LayerTreeImpl::UnregisterScrollbar( |
| 1720 ScrollbarLayerImplBase* scrollbar_layer) { | 1722 ScrollbarLayerImplBase* scrollbar_layer) { |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2121 | 2123 |
| 2122 void LayerTreeImpl::ResetAllChangeTracking() { | 2124 void LayerTreeImpl::ResetAllChangeTracking() { |
| 2123 layers_that_should_push_properties_.clear(); | 2125 layers_that_should_push_properties_.clear(); |
| 2124 // Iterate over all layers, including masks. | 2126 // Iterate over all layers, including masks. |
| 2125 for (auto& layer : *layers_) | 2127 for (auto& layer : *layers_) |
| 2126 layer->ResetChangeTracking(); | 2128 layer->ResetChangeTracking(); |
| 2127 property_trees_.ResetAllChangeTracking(); | 2129 property_trees_.ResetAllChangeTracking(); |
| 2128 } | 2130 } |
| 2129 | 2131 |
| 2130 } // namespace cc | 2132 } // namespace cc |
| OLD | NEW |