summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvollick <vollick@chromium.org>2016-03-01 10:05:57 -0800
committerCommit bot <commit-bot@chromium.org>2016-03-01 18:08:02 +0000
commitb7fd9e634dc35fa9e962956a77f2d122b5066891 (patch)
treee5df637e156e06b4a0d03cad48880ca64e3595a3
parent2b2e150daa8c95e0048bd0f68235a87c9a71f888 (diff)
downloadchromium_src-b7fd9e634dc35fa9e962956a77f2d122b5066891.zip
chromium_src-b7fd9e634dc35fa9e962956a77f2d122b5066891.tar.gz
chromium_src-b7fd9e634dc35fa9e962956a77f2d122b5066891.tar.bz2
Port ScrollState to LayerListImpl
BUG=557194 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1747253002 Cr-Commit-Position: refs/heads/master@{#378476}
-rw-r--r--cc/input/scroll_state.cc8
-rw-r--r--cc/input/scroll_state.h10
-rw-r--r--cc/trees/layer_tree_host_impl.cc4
3 files changed, 12 insertions, 10 deletions
diff --git a/cc/input/scroll_state.cc b/cc/input/scroll_state.cc
index f0e7751..5591eae 100644
--- a/cc/input/scroll_state.cc
+++ b/cc/input/scroll_state.cc
@@ -6,11 +6,13 @@
#include <utility>
-#include "cc/trees/layer_tree_impl.h"
+#include "cc/layers/layer_impl.h"
+#include "cc/layers/layer_list_impl.h"
namespace cc {
-ScrollState::ScrollState(ScrollStateData data) : data_(data) {}
+ScrollState::ScrollState(ScrollStateData data)
+ : data_(data), layer_list_impl_(nullptr) {}
ScrollState::ScrollState(const ScrollState& other) = default;
@@ -28,7 +30,7 @@ void ScrollState::DistributeToScrollChainDescendant() {
if (!scroll_chain_.empty()) {
const ScrollNode* next = scroll_chain_.front();
scroll_chain_.pop_front();
- layer_tree_impl_->list()->LayerById(next->owner_id)->DistributeScroll(this);
+ layer_list_impl_->LayerById(next->owner_id)->DistributeScroll(this);
}
}
diff --git a/cc/input/scroll_state.h b/cc/input/scroll_state.h
index 35a4f97..0e17297 100644
--- a/cc/input/scroll_state.h
+++ b/cc/input/scroll_state.h
@@ -15,7 +15,7 @@
namespace cc {
-class LayerTreeImpl;
+class LayerListImpl;
// ScrollState is based on the proposal for scroll customization in blink, found
// here: https://goo.gl/1ipTpP.
@@ -61,10 +61,10 @@ class CC_EXPORT ScrollState {
data_.is_direct_manipulation = is_direct_manipulation;
}
- void set_scroll_chain_and_layer_tree(
+ void set_scroll_chain_and_layer_list(
const std::list<const ScrollNode*>& scroll_chain,
- LayerTreeImpl* layer_tree_impl) {
- layer_tree_impl_ = layer_tree_impl;
+ LayerListImpl* layer_list_impl) {
+ layer_list_impl_ = layer_list_impl;
scroll_chain_ = scroll_chain;
}
@@ -97,7 +97,7 @@ class CC_EXPORT ScrollState {
private:
ScrollStateData data_;
- LayerTreeImpl* layer_tree_impl_;
+ LayerListImpl* layer_list_impl_;
std::list<const ScrollNode*> scroll_chain_;
};
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index ab3e020..8757f14 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -2977,8 +2977,8 @@ void LayerTreeHostImpl::DistributeScrollDelta(ScrollState* scroll_state) {
current_scroll_chain.push_front(scroll_node);
}
}
- scroll_state->set_scroll_chain_and_layer_tree(current_scroll_chain,
- active_tree());
+ scroll_state->set_scroll_chain_and_layer_list(current_scroll_chain,
+ active_list());
scroll_state->DistributeToScrollChainDescendant();
}