| 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 1654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1665 if (scrollbar_layer->orientation() == HORIZONTAL) { | 1665 if (scrollbar_layer->orientation() == HORIZONTAL) { |
| 1666 DCHECK_EQ(scrollbar_ids.horizontal, Layer::INVALID_ID) | 1666 DCHECK_EQ(scrollbar_ids.horizontal, Layer::INVALID_ID) |
| 1667 << "Existing scrollbar should have been unregistered."; | 1667 << "Existing scrollbar should have been unregistered."; |
| 1668 scrollbar_ids.horizontal = scrollbar_layer->id(); | 1668 scrollbar_ids.horizontal = scrollbar_layer->id(); |
| 1669 } else { | 1669 } else { |
| 1670 DCHECK_EQ(scrollbar_ids.vertical, Layer::INVALID_ID) | 1670 DCHECK_EQ(scrollbar_ids.vertical, Layer::INVALID_ID) |
| 1671 << "Existing scrollbar should have been unregistered."; | 1671 << "Existing scrollbar should have been unregistered."; |
| 1672 scrollbar_ids.vertical = scrollbar_layer->id(); | 1672 scrollbar_ids.vertical = scrollbar_layer->id(); |
| 1673 } | 1673 } |
| 1674 | 1674 |
| 1675 if (IsActiveTree() && scrollbar_layer->is_overlay_scrollbar()) { | 1675 if (IsActiveTree() && scrollbar_layer->is_overlay_scrollbar() && |
| 1676 scrollbar_layer->GetScrollbarAnimator() != |
| 1677 LayerTreeSettings::NO_ANIMATOR) { |
| 1676 layer_tree_host_impl_->RegisterScrollbarAnimationController( | 1678 layer_tree_host_impl_->RegisterScrollbarAnimationController( |
| 1677 scroll_element_id, scrollbar_layer->Opacity()); | 1679 scroll_element_id, scrollbar_layer->Opacity()); |
| 1678 } | 1680 } |
| 1679 | 1681 |
| 1680 // TODO(pdr): Refactor DidUpdateScrollState to use ElementIds instead of | 1682 // TODO(pdr): Refactor DidUpdateScrollState to use ElementIds instead of |
| 1681 // layer ids and remove this use of LayerIdByElementId. | 1683 // layer ids and remove this use of LayerIdByElementId. |
| 1682 DidUpdateScrollState(LayerIdByElementId(scroll_element_id)); | 1684 DidUpdateScrollState(LayerIdByElementId(scroll_element_id)); |
| 1683 } | 1685 } |
| 1684 | 1686 |
| 1685 void LayerTreeImpl::UnregisterScrollbar( | 1687 void LayerTreeImpl::UnregisterScrollbar( |
| (...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2117 | 2119 |
| 2118 void LayerTreeImpl::ResetAllChangeTracking() { | 2120 void LayerTreeImpl::ResetAllChangeTracking() { |
| 2119 layers_that_should_push_properties_.clear(); | 2121 layers_that_should_push_properties_.clear(); |
| 2120 // Iterate over all layers, including masks. | 2122 // Iterate over all layers, including masks. |
| 2121 for (auto& layer : *layers_) | 2123 for (auto& layer : *layers_) |
| 2122 layer->ResetChangeTracking(); | 2124 layer->ResetChangeTracking(); |
| 2123 property_trees_.ResetAllChangeTracking(); | 2125 property_trees_.ResetAllChangeTracking(); |
| 2124 } | 2126 } |
| 2125 | 2127 |
| 2126 } // namespace cc | 2128 } // namespace cc |
| OLD | NEW |