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

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: Rebase and add comment 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
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 void GetAllPrioritizedTilesForTracing( 128 void GetAllPrioritizedTilesForTracing(
129 std::vector<PrioritizedTile>* prioritized_tiles) const; 129 std::vector<PrioritizedTile>* prioritized_tiles) const;
130 void AsValueInto(base::trace_event::TracedValue* dict) const; 130 void AsValueInto(base::trace_event::TracedValue* dict) const;
131 131
132 // Other public methods 132 // Other public methods
133 // --------------------------------------------------------------------------- 133 // ---------------------------------------------------------------------------
134 LayerImpl* root_layer() const { return root_layer_.get(); } 134 LayerImpl* root_layer() const { return root_layer_.get(); }
135 void SetRootLayer(scoped_ptr<LayerImpl>); 135 void SetRootLayer(scoped_ptr<LayerImpl>);
136 scoped_ptr<LayerImpl> DetachLayerTree(); 136 scoped_ptr<LayerImpl> DetachLayerTree();
137 137
138 void SetPropertyTrees(const PropertyTrees& property_trees) { 138 void SetPropertyTrees(const PropertyTrees property_trees) {
139 property_trees_ = property_trees; 139 property_trees_ = property_trees;
140 property_trees_.is_main_thread = false;
141 property_trees_.is_active = IsActiveTree();
140 property_trees_.transform_tree.set_source_to_parent_updates_allowed(false); 142 property_trees_.transform_tree.set_source_to_parent_updates_allowed(false);
141 } 143 }
142 PropertyTrees* property_trees() { return &property_trees_; } 144 PropertyTrees* property_trees() { return &property_trees_; }
143 145
144 void UpdatePropertyTreesForBoundsDelta(); 146 void UpdatePropertyTreesForBoundsDelta();
145 147
146 void PushPropertiesTo(LayerTreeImpl* tree_impl); 148 void PushPropertiesTo(LayerTreeImpl* tree_impl);
147 149
148 LayerListIterator begin(); 150 LayerListIterator begin();
149 LayerListIterator end(); 151 LayerListIterator end();
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 void set_background_color(SkColor color) { background_color_ = color; } 211 void set_background_color(SkColor color) { background_color_ = color; }
210 212
211 bool has_transparent_background() const { 213 bool has_transparent_background() const {
212 return has_transparent_background_; 214 return has_transparent_background_;
213 } 215 }
214 void set_has_transparent_background(bool transparent) { 216 void set_has_transparent_background(bool transparent) {
215 has_transparent_background_ = transparent; 217 has_transparent_background_ = transparent;
216 } 218 }
217 219
218 void UpdatePropertyTreeScrollingAndAnimationFromMainThread(); 220 void UpdatePropertyTreeScrollingAndAnimationFromMainThread();
221 void UpdatePropertyTreeScrollOffset(PropertyTrees* property_trees) {
222 property_trees_.scroll_tree.UpdateScrollOffsetMap(
223 &property_trees->scroll_tree.scroll_offset_map(), this);
224 }
219 void SetPageScaleOnActiveTree(float active_page_scale); 225 void SetPageScaleOnActiveTree(float active_page_scale);
220 void PushPageScaleFromMainThread(float page_scale_factor, 226 void PushPageScaleFromMainThread(float page_scale_factor,
221 float min_page_scale_factor, 227 float min_page_scale_factor,
222 float max_page_scale_factor); 228 float max_page_scale_factor);
223 float current_page_scale_factor() const { 229 float current_page_scale_factor() const {
224 return page_scale_factor()->Current(IsActiveTree()); 230 return page_scale_factor()->Current(IsActiveTree());
225 } 231 }
226 float min_page_scale_factor() const { return min_page_scale_factor_; } 232 float min_page_scale_factor() const { return min_page_scale_factor_; }
227 float max_page_scale_factor() const { return max_page_scale_factor_; } 233 float max_page_scale_factor() const { return max_page_scale_factor_; }
228 234
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 572
567 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; 573 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_;
568 574
569 private: 575 private:
570 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); 576 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl);
571 }; 577 };
572 578
573 } // namespace cc 579 } // namespace cc
574 580
575 #endif // CC_TREES_LAYER_TREE_IMPL_H_ 581 #endif // CC_TREES_LAYER_TREE_IMPL_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698