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

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

Issue 2445093002: cc/blimp: Add synchronization for scroll/scale state. (Closed)
Patch Set: test compile Created 4 years, 1 month 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.cc ('k') | cc/trees/layer_tree_host_common.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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_HOST_COMMON_H_ 5 #ifndef CC_TREES_LAYER_TREE_HOST_COMMON_H_
6 #define CC_TREES_LAYER_TREE_HOST_COMMON_H_ 6 #define CC_TREES_LAYER_TREE_HOST_COMMON_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <limits> 10 #include <limits>
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 ScrollbarsUpdateInfo(); 166 ScrollbarsUpdateInfo();
167 ScrollbarsUpdateInfo(int layer_id, bool hidden); 167 ScrollbarsUpdateInfo(int layer_id, bool hidden);
168 168
169 bool operator==(const ScrollbarsUpdateInfo& other) const; 169 bool operator==(const ScrollbarsUpdateInfo& other) const;
170 170
171 void ToProtobuf(proto::ScrollbarsUpdateInfo* proto) const; 171 void ToProtobuf(proto::ScrollbarsUpdateInfo* proto) const;
172 void FromProtobuf(const proto::ScrollbarsUpdateInfo& proto); 172 void FromProtobuf(const proto::ScrollbarsUpdateInfo& proto);
173 }; 173 };
174 }; 174 };
175 175
176 // A container for the state that was reported to the main thread during
177 // BeginMainFrame, but could not be applied/resolved on the main thread.
178 struct CC_EXPORT ReflectedMainFrameState {
179 struct ScrollUpdate {
180 int layer_id = Layer::LayerIdLabels::INVALID_ID;
181 gfx::Vector2dF scroll_delta;
182 };
183
184 ReflectedMainFrameState();
185 ~ReflectedMainFrameState();
186
187 std::vector<ScrollUpdate> scrolls;
188 float page_scale_delta;
189 };
190
176 struct CC_EXPORT ScrollAndScaleSet { 191 struct CC_EXPORT ScrollAndScaleSet {
177 ScrollAndScaleSet(); 192 ScrollAndScaleSet();
178 ~ScrollAndScaleSet(); 193 ~ScrollAndScaleSet();
179 194
180 // The inner viewport scroll delta is kept separate since it's special. 195 // The inner viewport scroll delta is kept separate since it's special.
181 // Because the inner (visual) viewport's maximum offset depends on the 196 // Because the inner (visual) viewport's maximum offset depends on the
182 // current page scale, the two must be committed at the same time to prevent 197 // current page scale, the two must be committed at the same time to prevent
183 // clamping. 198 // clamping.
184 LayerTreeHostCommon::ScrollUpdateInfo inner_viewport_scroll; 199 LayerTreeHostCommon::ScrollUpdateInfo inner_viewport_scroll;
185 200
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 function(tree_impl->LayerById(id)); 233 function(tree_impl->LayerById(id));
219 } 234 }
220 } 235 }
221 236
222 CC_EXPORT PropertyTrees* GetPropertyTrees(Layer* layer); 237 CC_EXPORT PropertyTrees* GetPropertyTrees(Layer* layer);
223 CC_EXPORT PropertyTrees* GetPropertyTrees(LayerImpl* layer); 238 CC_EXPORT PropertyTrees* GetPropertyTrees(LayerImpl* layer);
224 239
225 } // namespace cc 240 } // namespace cc
226 241
227 #endif // CC_TREES_LAYER_TREE_HOST_COMMON_H_ 242 #endif // CC_TREES_LAYER_TREE_HOST_COMMON_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree.cc ('k') | cc/trees/layer_tree_host_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698