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

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: Remove scroll_offset() from LayerImpl 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 void GetAllPrioritizedTilesForTracing( 125 void GetAllPrioritizedTilesForTracing(
126 std::vector<PrioritizedTile>* prioritized_tiles) const; 126 std::vector<PrioritizedTile>* prioritized_tiles) const;
127 void AsValueInto(base::trace_event::TracedValue* dict) const; 127 void AsValueInto(base::trace_event::TracedValue* dict) const;
128 128
129 // Other public methods 129 // Other public methods
130 // --------------------------------------------------------------------------- 130 // ---------------------------------------------------------------------------
131 LayerImpl* root_layer() const { return root_layer_.get(); } 131 LayerImpl* root_layer() const { return root_layer_.get(); }
132 void SetRootLayer(scoped_ptr<LayerImpl>); 132 void SetRootLayer(scoped_ptr<LayerImpl>);
133 scoped_ptr<LayerImpl> DetachLayerTree(); 133 scoped_ptr<LayerImpl> DetachLayerTree();
134 134
135 void SetPropertyTrees(const PropertyTrees& property_trees) { 135 void SetPropertyTrees(const PropertyTrees property_trees) {
136 property_trees_ = property_trees; 136 property_trees_ = property_trees;
137 property_trees_.is_main_thread = false;
138 property_trees_.is_active = IsActiveTree();
137 property_trees_.transform_tree.set_source_to_parent_updates_allowed(false); 139 property_trees_.transform_tree.set_source_to_parent_updates_allowed(false);
138 } 140 }
139 PropertyTrees* property_trees() { return &property_trees_; } 141 PropertyTrees* property_trees() { return &property_trees_; }
140 142
141 void UpdatePropertyTreesForBoundsDelta(); 143 void UpdatePropertyTreesForBoundsDelta();
142 144
143 void PushPropertiesTo(LayerTreeImpl* tree_impl); 145 void PushPropertiesTo(LayerTreeImpl* tree_impl);
144 146
145 // TODO(thakis): Consider marking this CC_EXPORT once we understand 147 // TODO(thakis): Consider marking this CC_EXPORT once we understand
146 // http://crbug.com/575700 better. 148 // http://crbug.com/575700 better.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 void set_background_color(SkColor color) { background_color_ = color; } 203 void set_background_color(SkColor color) { background_color_ = color; }
202 204
203 bool has_transparent_background() const { 205 bool has_transparent_background() const {
204 return has_transparent_background_; 206 return has_transparent_background_;
205 } 207 }
206 void set_has_transparent_background(bool transparent) { 208 void set_has_transparent_background(bool transparent) {
207 has_transparent_background_ = transparent; 209 has_transparent_background_ = transparent;
208 } 210 }
209 211
210 void UpdatePropertyTreeScrollingAndAnimationFromMainThread(); 212 void UpdatePropertyTreeScrollingAndAnimationFromMainThread();
213 void UpdatePropertyTreeScrollOffset(PropertyTrees* property_trees) {
214 property_trees_.scroll_tree.UpdateScrollOffsetMap(
215 &property_trees->scroll_tree.scroll_offset_map(), this);
216 }
211 void SetPageScaleOnActiveTree(float active_page_scale); 217 void SetPageScaleOnActiveTree(float active_page_scale);
212 void PushPageScaleFromMainThread(float page_scale_factor, 218 void PushPageScaleFromMainThread(float page_scale_factor,
213 float min_page_scale_factor, 219 float min_page_scale_factor,
214 float max_page_scale_factor); 220 float max_page_scale_factor);
215 float current_page_scale_factor() const { 221 float current_page_scale_factor() const {
216 return page_scale_factor()->Current(IsActiveTree()); 222 return page_scale_factor()->Current(IsActiveTree());
217 } 223 }
218 float min_page_scale_factor() const { return min_page_scale_factor_; } 224 float min_page_scale_factor() const { return min_page_scale_factor_; }
219 float max_page_scale_factor() const { return max_page_scale_factor_; } 225 float max_page_scale_factor() const { return max_page_scale_factor_; }
220 226
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 564
559 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; 565 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_;
560 566
561 private: 567 private:
562 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); 568 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl);
563 }; 569 };
564 570
565 } // namespace cc 571 } // namespace cc
566 572
567 #endif // CC_TREES_LAYER_TREE_IMPL_H_ 573 #endif // CC_TREES_LAYER_TREE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698