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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 2708493002: Refactor scroll chaining to use ScrollNodes without going through LayerImpl (Closed)
Patch Set: Created 3 years, 10 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
« cc/input/scroll_state.h ('K') | « cc/layers/layer_impl.cc ('k') | no next file » | 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 75194f6628628b5b8c7a27940422183a691cd0ad..cc7adabbe5f0facaae8800b443e54b0aee7b5e21 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -3010,7 +3010,7 @@ gfx::Vector2dF LayerTreeHostImpl::ScrollSingleNode(
void LayerTreeHostImpl::ApplyScroll(ScrollNode* scroll_node,
ScrollState* scroll_state) {
- DCHECK(scroll_state);
+ DCHECK(scroll_node && scroll_state);
gfx::Point viewport_point(scroll_state->position_x(),
scroll_state->position_y());
const gfx::Vector2dF delta(scroll_state->delta_x(), scroll_state->delta_y());
@@ -3088,7 +3088,7 @@ void LayerTreeHostImpl::DistributeScrollDelta(ScrollState* scroll_state) {
// is not the case here. We eventually want to have the same behaviour on both
// sides but it may become a non issue if we get rid of scroll chaining (see
// crbug.com/526462)
- std::list<const ScrollNode*> current_scroll_chain;
+ std::list<ScrollNode*> current_scroll_chain;
ScrollTree& scroll_tree = active_tree_->property_trees()->scroll_tree;
ScrollNode* scroll_node = scroll_tree.CurrentlyScrollingNode();
ScrollNode* viewport_scroll_node =
@@ -3115,7 +3115,7 @@ void LayerTreeHostImpl::DistributeScrollDelta(ScrollState* scroll_state) {
current_scroll_chain.push_front(scroll_node);
}
}
- scroll_state->set_scroll_chain_and_layer_tree(current_scroll_chain,
+ scroll_state->set_scroll_chain_and_layer_tree(&current_scroll_chain,
active_tree());
scroll_state->DistributeToScrollChainDescendant();
}
« cc/input/scroll_state.h ('K') | « cc/layers/layer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698