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

Unified Diff: cc/trees/draw_property_utils.cc

Issue 2830473002: Revert of Remove UpdateScrollTree (Closed)
Patch Set: Created 3 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/draw_property_utils.cc
diff --git a/cc/trees/draw_property_utils.cc b/cc/trees/draw_property_utils.cc
index 1438d743f2090793ccbe322b573b39ba13353f86..27eb425da9995d22ce9b3ac02f1f37b16c99cbdf 100644
--- a/cc/trees/draw_property_utils.cc
+++ b/cc/trees/draw_property_utils.cc
@@ -743,6 +743,23 @@
}
}
+static void UpdateScrollTree(ScrollTree* scroll_tree,
+ const LayerTreeHost* layer_tree_host) {
+ if (!scroll_tree->needs_update())
+ return;
+
+ for (int i = ScrollTree::kRootNodeId;
+ i < static_cast<int>(scroll_tree->size()); ++i) {
+ ScrollNode* scroll_node = scroll_tree->Node(i);
+ if (Layer* scroll_layer =
+ layer_tree_host->LayerById(scroll_node->owning_layer_id)) {
+ if (Layer* scroll_clip_layer = scroll_layer->scroll_clip_layer()) {
+ scroll_node->scroll_clip_layer_bounds = scroll_clip_layer->bounds();
+ }
+ }
+ }
+}
+
static void ComputeClips(PropertyTrees* property_trees) {
DCHECK(!property_trees->transform_tree.needs_update());
ClipTree* clip_tree = &property_trees->clip_tree;
@@ -872,6 +889,7 @@
property_trees->clip_tree.set_needs_update(true);
property_trees->effect_tree.set_needs_update(true);
}
+ UpdateScrollTree(&property_trees->scroll_tree, layer_tree_host);
ComputeTransforms(&property_trees->transform_tree);
ComputeEffects(&property_trees->effect_tree);
// Computation of clips uses ToScreen which is updated while computing
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698