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

Unified Diff: cc/layers/layer_impl.cc

Issue 1626513003: Add ScrollTree builder and unit test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename other_criteria, remove is_root in GetScrollParent and fixed a previous mistake in unit test. Created 4 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
Index: cc/layers/layer_impl.cc
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index 540de09d49b251b5527c86288574a24212617099..95ad8019a92e94964d130842ef1d67524026d44c 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -88,6 +88,7 @@ LayerImpl::LayerImpl(LayerTreeImpl* tree_impl,
transform_tree_index_(-1),
effect_tree_index_(-1),
clip_tree_index_(-1),
+ scroll_tree_index_(-1),
draw_depth_(0.f),
needs_push_properties_(false),
num_dependents_need_push_properties_(0),
@@ -278,6 +279,11 @@ void LayerImpl::SetEffectTreeIndex(int index) {
SetNeedsPushProperties();
}
+void LayerImpl::SetScrollTreeIndex(int index) {
+ scroll_tree_index_ = index;
+ SetNeedsPushProperties();
+}
+
void LayerImpl::PassCopyRequests(
std::vector<scoped_ptr<CopyOutputRequest>>* requests) {
// In the case that a layer still has a copy request, this means that there's
@@ -658,6 +664,7 @@ void LayerImpl::PushPropertiesTo(LayerImpl* layer) {
layer->SetTransformTreeIndex(transform_tree_index_);
layer->SetClipTreeIndex(clip_tree_index_);
layer->SetEffectTreeIndex(effect_tree_index_);
+ layer->SetScrollTreeIndex(scroll_tree_index_);
layer->set_offset_to_transform_parent(offset_to_transform_parent_);
layer->set_is_hidden_from_property_trees(is_hidden_from_property_trees_);

Powered by Google App Engine
This is Rietveld 408576698