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 1676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1687 } | 1687 } |
1688 | 1688 |
1689 void LayerTreeImpl::RegisterScrollLayer(LayerImpl* layer) { | 1689 void LayerTreeImpl::RegisterScrollLayer(LayerImpl* layer) { |
1690 if (layer->scroll_clip_layer_id() == Layer::INVALID_ID) | 1690 if (layer->scroll_clip_layer_id() == Layer::INVALID_ID) |
1691 return; | 1691 return; |
1692 | 1692 |
1693 clip_scroll_map_.insert( | 1693 clip_scroll_map_.insert( |
1694 std::pair<int, int>(layer->scroll_clip_layer_id(), layer->id())); | 1694 std::pair<int, int>(layer->scroll_clip_layer_id(), layer->id())); |
1695 | 1695 |
1696 DidUpdateScrollState(layer->id()); | 1696 DidUpdateScrollState(layer->id()); |
| 1697 |
| 1698 if (settings().scrollbar_animator == LayerTreeSettings::AURA_OVERLAY) |
| 1699 layer->set_needs_show_scrollbars(true); |
1697 } | 1700 } |
1698 | 1701 |
1699 void LayerTreeImpl::UnregisterScrollLayer(LayerImpl* layer) { | 1702 void LayerTreeImpl::UnregisterScrollLayer(LayerImpl* layer) { |
1700 if (layer->scroll_clip_layer_id() == Layer::INVALID_ID) | 1703 if (layer->scroll_clip_layer_id() == Layer::INVALID_ID) |
1701 return; | 1704 return; |
1702 | 1705 |
1703 clip_scroll_map_.erase(layer->scroll_clip_layer_id()); | 1706 clip_scroll_map_.erase(layer->scroll_clip_layer_id()); |
1704 } | 1707 } |
1705 | 1708 |
1706 void LayerTreeImpl::AddSurfaceLayer(LayerImpl* layer) { | 1709 void LayerTreeImpl::AddSurfaceLayer(LayerImpl* layer) { |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2083 | 2086 |
2084 void LayerTreeImpl::ResetAllChangeTracking() { | 2087 void LayerTreeImpl::ResetAllChangeTracking() { |
2085 layers_that_should_push_properties_.clear(); | 2088 layers_that_should_push_properties_.clear(); |
2086 // Iterate over all layers, including masks. | 2089 // Iterate over all layers, including masks. |
2087 for (auto& layer : *layers_) | 2090 for (auto& layer : *layers_) |
2088 layer->ResetChangeTracking(); | 2091 layer->ResetChangeTracking(); |
2089 property_trees_.ResetAllChangeTracking(); | 2092 property_trees_.ResetAllChangeTracking(); |
2090 } | 2093 } |
2091 | 2094 |
2092 } // namespace cc | 2095 } // namespace cc |
OLD | NEW |