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_host_impl.h" | 5 #include "cc/trees/layer_tree_host_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 3935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3946 PropertyTrees* property_trees = tree->property_trees(); | 3946 PropertyTrees* property_trees = tree->property_trees(); |
3947 DCHECK(property_trees->IsInIdToIndexMap(PropertyTrees::TreeType::SCROLL, | 3947 DCHECK(property_trees->IsInIdToIndexMap(PropertyTrees::TreeType::SCROLL, |
3948 layer_id)); | 3948 layer_id)); |
3949 DCHECK_EQ( | 3949 DCHECK_EQ( |
3950 1u, property_trees->element_id_to_transform_node_index.count(element_id)); | 3950 1u, property_trees->element_id_to_transform_node_index.count(element_id)); |
3951 int transform_node_index = | 3951 int transform_node_index = |
3952 property_trees->element_id_to_transform_node_index[element_id]; | 3952 property_trees->element_id_to_transform_node_index[element_id]; |
3953 // TODO(wkorman): Build map from element id to scroll node in property tree | 3953 // TODO(wkorman): Build map from element id to scroll node in property tree |
3954 // builder and make use of it below. | 3954 // builder and make use of it below. |
3955 const int scroll_node_index = | 3955 const int scroll_node_index = |
3956 property_trees->scroll_id_to_index_map[layer_id]; | 3956 property_trees->layer_id_to_scroll_node_index[layer_id]; |
3957 if (scroll_node_index != ScrollTree::kInvalidNodeId) { | 3957 if (scroll_node_index != ScrollTree::kInvalidNodeId) { |
3958 property_trees->scroll_tree.OnScrollOffsetAnimated( | 3958 property_trees->scroll_tree.OnScrollOffsetAnimated( |
3959 layer_id, transform_node_index, scroll_node_index, scroll_offset, tree); | 3959 layer_id, transform_node_index, scroll_node_index, scroll_offset, tree); |
3960 // Run mutation callbacks to respond to updated scroll offset. | 3960 // Run mutation callbacks to respond to updated scroll offset. |
3961 Mutate(CurrentBeginFrameArgs().frame_time); | 3961 Mutate(CurrentBeginFrameArgs().frame_time); |
3962 } | 3962 } |
3963 } | 3963 } |
3964 | 3964 |
3965 bool LayerTreeHostImpl::AnimationsPreserveAxisAlignment( | 3965 bool LayerTreeHostImpl::AnimationsPreserveAxisAlignment( |
3966 const LayerImpl* layer) const { | 3966 const LayerImpl* layer) const { |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4089 worker_context_visibility_ = | 4089 worker_context_visibility_ = |
4090 worker_context->CacheController()->ClientBecameVisible(); | 4090 worker_context->CacheController()->ClientBecameVisible(); |
4091 } else { | 4091 } else { |
4092 worker_context->CacheController()->ClientBecameNotVisible( | 4092 worker_context->CacheController()->ClientBecameNotVisible( |
4093 std::move(worker_context_visibility_)); | 4093 std::move(worker_context_visibility_)); |
4094 } | 4094 } |
4095 } | 4095 } |
4096 } | 4096 } |
4097 | 4097 |
4098 } // namespace cc | 4098 } // namespace cc |
OLD | NEW |