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