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 1690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1701 } | 1701 } |
1702 | 1702 |
1703 void LayerTreeImpl::RegisterScrollLayer(LayerImpl* layer) { | 1703 void LayerTreeImpl::RegisterScrollLayer(LayerImpl* layer) { |
1704 if (layer->scroll_clip_layer_id() == Layer::INVALID_ID) | 1704 if (layer->scroll_clip_layer_id() == Layer::INVALID_ID) |
1705 return; | 1705 return; |
1706 | 1706 |
1707 clip_scroll_map_.insert( | 1707 clip_scroll_map_.insert( |
1708 std::pair<int, int>(layer->scroll_clip_layer_id(), layer->id())); | 1708 std::pair<int, int>(layer->scroll_clip_layer_id(), layer->id())); |
1709 | 1709 |
1710 DidUpdateScrollState(layer->id()); | 1710 DidUpdateScrollState(layer->id()); |
1711 | |
1712 layer->set_needs_show_scrollbars(true); | |
1713 } | 1711 } |
1714 | 1712 |
1715 void LayerTreeImpl::UnregisterScrollLayer(LayerImpl* layer) { | 1713 void LayerTreeImpl::UnregisterScrollLayer(LayerImpl* layer) { |
1716 if (layer->scroll_clip_layer_id() == Layer::INVALID_ID) | 1714 if (layer->scroll_clip_layer_id() == Layer::INVALID_ID) |
1717 return; | 1715 return; |
1718 | 1716 |
1719 clip_scroll_map_.erase(layer->scroll_clip_layer_id()); | 1717 clip_scroll_map_.erase(layer->scroll_clip_layer_id()); |
1720 } | 1718 } |
1721 | 1719 |
1722 void LayerTreeImpl::AddSurfaceLayer(LayerImpl* layer) { | 1720 void LayerTreeImpl::AddSurfaceLayer(LayerImpl* layer) { |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2122 | 2120 |
2123 void LayerTreeImpl::ResetAllChangeTracking() { | 2121 void LayerTreeImpl::ResetAllChangeTracking() { |
2124 layers_that_should_push_properties_.clear(); | 2122 layers_that_should_push_properties_.clear(); |
2125 // Iterate over all layers, including masks. | 2123 // Iterate over all layers, including masks. |
2126 for (auto& layer : *layers_) | 2124 for (auto& layer : *layers_) |
2127 layer->ResetChangeTracking(); | 2125 layer->ResetChangeTracking(); |
2128 property_trees_.ResetAllChangeTracking(); | 2126 property_trees_.ResetAllChangeTracking(); |
2129 } | 2127 } |
2130 | 2128 |
2131 } // namespace cc | 2129 } // namespace cc |
OLD | NEW |