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

Side by Side Diff: cc/trees/layer_tree_impl.h

Issue 1736073002: cc: Move SyncedScrollOffset to scroll tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix after rebase Created 4 years, 9 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 #ifndef CC_TREES_LAYER_TREE_IMPL_H_ 5 #ifndef CC_TREES_LAYER_TREE_IMPL_H_
6 #define CC_TREES_LAYER_TREE_IMPL_H_ 6 #define CC_TREES_LAYER_TREE_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 void GetAllPrioritizedTilesForTracing( 122 void GetAllPrioritizedTilesForTracing(
123 std::vector<PrioritizedTile>* prioritized_tiles) const; 123 std::vector<PrioritizedTile>* prioritized_tiles) const;
124 void AsValueInto(base::trace_event::TracedValue* dict) const; 124 void AsValueInto(base::trace_event::TracedValue* dict) const;
125 125
126 // Other public methods 126 // Other public methods
127 // --------------------------------------------------------------------------- 127 // ---------------------------------------------------------------------------
128 LayerImpl* root_layer() const { return root_layer_.get(); } 128 LayerImpl* root_layer() const { return root_layer_.get(); }
129 void SetRootLayer(scoped_ptr<LayerImpl>); 129 void SetRootLayer(scoped_ptr<LayerImpl>);
130 scoped_ptr<LayerImpl> DetachLayerTree(); 130 scoped_ptr<LayerImpl> DetachLayerTree();
131 131
132 void SetPropertyTrees(const PropertyTrees& property_trees) { 132 void SetPropertyTrees(const PropertyTrees property_trees) {
133 property_trees_ = property_trees; 133 property_trees_ = property_trees;
134 property_trees_.is_main_thread = false;
135 property_trees_.is_active = IsActiveTree();
134 property_trees_.transform_tree.set_source_to_parent_updates_allowed(false); 136 property_trees_.transform_tree.set_source_to_parent_updates_allowed(false);
135 } 137 }
136 PropertyTrees* property_trees() { return &property_trees_; } 138 PropertyTrees* property_trees() { return &property_trees_; }
137 139
138 void UpdatePropertyTreesForBoundsDelta(); 140 void UpdatePropertyTreesForBoundsDelta();
139 141
140 void PushPropertiesTo(LayerTreeImpl* tree_impl); 142 void PushPropertiesTo(LayerTreeImpl* tree_impl);
141 143
142 int source_frame_number() const { return source_frame_number_; } 144 int source_frame_number() const { return source_frame_number_; }
143 void set_source_frame_number(int frame_number) { 145 void set_source_frame_number(int frame_number) {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 void set_background_color(SkColor color) { background_color_ = color; } 186 void set_background_color(SkColor color) { background_color_ = color; }
185 187
186 bool has_transparent_background() const { 188 bool has_transparent_background() const {
187 return has_transparent_background_; 189 return has_transparent_background_;
188 } 190 }
189 void set_has_transparent_background(bool transparent) { 191 void set_has_transparent_background(bool transparent) {
190 has_transparent_background_ = transparent; 192 has_transparent_background_ = transparent;
191 } 193 }
192 194
193 void UpdatePropertyTreeScrollingAndAnimationFromMainThread(); 195 void UpdatePropertyTreeScrollingAndAnimationFromMainThread();
196 void UpdatePropertyTreeScrollOffset(PropertyTrees* property_trees) {
197 if (root_layer())
198 property_trees_.scroll_tree.UpdateScrollOffsetMap(
199 &property_trees->scroll_tree.scroll_offset_map(),
200 root_layer()->layer_list_impl());
ajuma 2016/03/01 22:54:20 Can this use layer_list_ directly (without going t
sunxd 2016/03/02 17:45:34 Since the layer_list change is reverted. I can kee
201 }
194 void SetPageScaleOnActiveTree(float active_page_scale); 202 void SetPageScaleOnActiveTree(float active_page_scale);
195 void PushPageScaleFromMainThread(float page_scale_factor, 203 void PushPageScaleFromMainThread(float page_scale_factor,
196 float min_page_scale_factor, 204 float min_page_scale_factor,
197 float max_page_scale_factor); 205 float max_page_scale_factor);
198 float current_page_scale_factor() const { 206 float current_page_scale_factor() const {
199 return page_scale_factor()->Current(IsActiveTree()); 207 return page_scale_factor()->Current(IsActiveTree());
200 } 208 }
201 float min_page_scale_factor() const { return min_page_scale_factor_; } 209 float min_page_scale_factor() const { return min_page_scale_factor_; }
202 float max_page_scale_factor() const { return max_page_scale_factor_; } 210 float max_page_scale_factor() const { return max_page_scale_factor_; }
203 211
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 // the layer tree. 544 // the layer tree.
537 scoped_ptr<LayerListImpl> layer_list_; 545 scoped_ptr<LayerListImpl> layer_list_;
538 546
539 private: 547 private:
540 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); 548 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl);
541 }; 549 };
542 550
543 } // namespace cc 551 } // namespace cc
544 552
545 #endif // CC_TREES_LAYER_TREE_IMPL_H_ 553 #endif // CC_TREES_LAYER_TREE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698