Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1982)

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 2623313003: Add map from element id to scroll node index. (Closed)
Patch Set: Sync to head. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index f4ce94d2bd4be5f8189366801b9704f29dc308c9..0b89de5202f084738f77955bcc885f4a53990da2 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -3941,16 +3941,14 @@ void LayerTreeHostImpl::SetTreeLayerScrollOffsetMutated(
1u, property_trees->element_id_to_transform_node_index.count(element_id));
int transform_node_index =
property_trees->element_id_to_transform_node_index[element_id];
- // TODO(wkorman): Build map from element id to scroll node in property tree
- // builder and make use of it below.
+ DCHECK_EQ(1u,
+ property_trees->element_id_to_scroll_node_index.count(element_id));
const int scroll_node_index =
- property_trees->layer_id_to_scroll_node_index[layer_id];
- if (scroll_node_index != ScrollTree::kInvalidNodeId) {
- property_trees->scroll_tree.OnScrollOffsetAnimated(
- layer_id, transform_node_index, scroll_node_index, scroll_offset, tree);
- // Run mutation callbacks to respond to updated scroll offset.
- Mutate(CurrentBeginFrameArgs().frame_time);
- }
+ property_trees->element_id_to_scroll_node_index[element_id];
+ property_trees->scroll_tree.OnScrollOffsetAnimated(
+ layer_id, transform_node_index, scroll_node_index, scroll_offset, tree);
+ // Run mutation callbacks to respond to updated scroll offset.
+ Mutate(CurrentBeginFrameArgs().frame_time);
}
bool LayerTreeHostImpl::AnimationsPreserveAxisAlignment(
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698