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

Side by Side Diff: cc/layers/layer_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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/layers/layer_impl.h" 5 #include "cc/layers/layer_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 return IsActive() ? ElementListType::ACTIVE : ElementListType::PENDING; 126 return IsActive() ? ElementListType::ACTIVE : ElementListType::PENDING;
127 } 127 }
128 128
129 void LayerImpl::SetDebugInfo( 129 void LayerImpl::SetDebugInfo(
130 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> debug_info) { 130 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> debug_info) {
131 owned_debug_info_ = std::move(debug_info); 131 owned_debug_info_ = std::move(debug_info);
132 debug_info_ = owned_debug_info_.get(); 132 debug_info_ = owned_debug_info_.get();
133 SetNeedsPushProperties(); 133 SetNeedsPushProperties();
134 } 134 }
135 135
136 void LayerImpl::DistributeScroll(ScrollState* scroll_state) {
137 ScrollTree& scroll_tree = GetScrollTree();
138 ScrollNode* scroll_node = scroll_tree.Node(scroll_tree_index());
139 scroll_tree.DistributeScroll(scroll_node, scroll_state);
140 }
141
142 void LayerImpl::SetTransformTreeIndex(int index) { 136 void LayerImpl::SetTransformTreeIndex(int index) {
143 transform_tree_index_ = index; 137 transform_tree_index_ = index;
144 } 138 }
145 139
146 void LayerImpl::SetClipTreeIndex(int index) { 140 void LayerImpl::SetClipTreeIndex(int index) {
147 clip_tree_index_ = index; 141 clip_tree_index_ = index;
148 } 142 }
149 143
150 void LayerImpl::SetEffectTreeIndex(int index) { 144 void LayerImpl::SetEffectTreeIndex(int index) {
151 effect_tree_index_ = index; 145 effect_tree_index_ = index;
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after
1097 1091
1098 ScrollTree& LayerImpl::GetScrollTree() const { 1092 ScrollTree& LayerImpl::GetScrollTree() const {
1099 return GetPropertyTrees()->scroll_tree; 1093 return GetPropertyTrees()->scroll_tree;
1100 } 1094 }
1101 1095
1102 TransformTree& LayerImpl::GetTransformTree() const { 1096 TransformTree& LayerImpl::GetTransformTree() const {
1103 return GetPropertyTrees()->transform_tree; 1097 return GetPropertyTrees()->transform_tree;
1104 } 1098 }
1105 1099
1106 } // namespace cc 1100 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698