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

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: Add gyp dependency 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 // TODO(thakis): Consider marking this CC_EXPORT once we understand 144 // TODO(thakis): Consider marking this CC_EXPORT once we understand
143 // http://crbug.com/575700 better. 145 // http://crbug.com/575700 better.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 void set_background_color(SkColor color) { background_color_ = color; } 200 void set_background_color(SkColor color) { background_color_ = color; }
199 201
200 bool has_transparent_background() const { 202 bool has_transparent_background() const {
201 return has_transparent_background_; 203 return has_transparent_background_;
202 } 204 }
203 void set_has_transparent_background(bool transparent) { 205 void set_has_transparent_background(bool transparent) {
204 has_transparent_background_ = transparent; 206 has_transparent_background_ = transparent;
205 } 207 }
206 208
207 void UpdatePropertyTreeScrollingAndAnimationFromMainThread(); 209 void UpdatePropertyTreeScrollingAndAnimationFromMainThread();
210 void UpdatePropertyTreeScrollOffset(PropertyTrees* property_trees) {
211 property_trees_.scroll_tree.UpdateScrollOffsetMap(
212 &property_trees->scroll_tree.scroll_offset_map(), this);
213 }
208 void SetPageScaleOnActiveTree(float active_page_scale); 214 void SetPageScaleOnActiveTree(float active_page_scale);
209 void PushPageScaleFromMainThread(float page_scale_factor, 215 void PushPageScaleFromMainThread(float page_scale_factor,
210 float min_page_scale_factor, 216 float min_page_scale_factor,
211 float max_page_scale_factor); 217 float max_page_scale_factor);
212 float current_page_scale_factor() const { 218 float current_page_scale_factor() const {
213 return page_scale_factor()->Current(IsActiveTree()); 219 return page_scale_factor()->Current(IsActiveTree());
214 } 220 }
215 float min_page_scale_factor() const { return min_page_scale_factor_; } 221 float min_page_scale_factor() const { return min_page_scale_factor_; }
216 float max_page_scale_factor() const { return max_page_scale_factor_; } 222 float max_page_scale_factor() const { return max_page_scale_factor_; }
217 223
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 560
555 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; 561 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_;
556 562
557 private: 563 private:
558 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); 564 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl);
559 }; 565 };
560 566
561 } // namespace cc 567 } // namespace cc
562 568
563 #endif // CC_TREES_LAYER_TREE_IMPL_H_ 569 #endif // CC_TREES_LAYER_TREE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698