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

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

Issue 2445093002: cc/blimp: Add synchronization for scroll/scale state. (Closed)
Patch Set: Addressed comments 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
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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 147
148 ScrollUpdateInfo(); 148 ScrollUpdateInfo();
149 149
150 bool operator==(const ScrollUpdateInfo& other) const; 150 bool operator==(const ScrollUpdateInfo& other) const;
151 151
152 void ToProtobuf(proto::ScrollUpdateInfo* proto) const; 152 void ToProtobuf(proto::ScrollUpdateInfo* proto) const;
153 void FromProtobuf(const proto::ScrollUpdateInfo& proto); 153 void FromProtobuf(const proto::ScrollUpdateInfo& proto);
154 }; 154 };
155 }; 155 };
156 156
157 // A container for the state that was reported to the main thread during
158 // BeginMainFrame, but could not be applied/resolved on the main thread.
159 struct CC_EXPORT ReflectedMainFrameState {
160 ReflectedMainFrameState();
161 ~ReflectedMainFrameState();
162
163 std::vector<LayerTreeHostCommon::ScrollUpdateInfo> scrolls;
164 float page_scale_delta;
165 };
166
157 struct CC_EXPORT ScrollAndScaleSet { 167 struct CC_EXPORT ScrollAndScaleSet {
158 ScrollAndScaleSet(); 168 ScrollAndScaleSet();
159 ~ScrollAndScaleSet(); 169 ~ScrollAndScaleSet();
160 170
161 // The inner viewport scroll delta is kept separate since it's special. 171 // The inner viewport scroll delta is kept separate since it's special.
162 // Because the inner (visual) viewport's maximum offset depends on the 172 // Because the inner (visual) viewport's maximum offset depends on the
163 // current page scale, the two must be committed at the same time to prevent 173 // current page scale, the two must be committed at the same time to prevent
164 // clamping. 174 // clamping.
165 LayerTreeHostCommon::ScrollUpdateInfo inner_viewport_scroll; 175 LayerTreeHostCommon::ScrollUpdateInfo inner_viewport_scroll;
166 176
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 function(tree_impl->LayerById(id)); 208 function(tree_impl->LayerById(id));
199 } 209 }
200 } 210 }
201 211
202 CC_EXPORT PropertyTrees* GetPropertyTrees(Layer* layer); 212 CC_EXPORT PropertyTrees* GetPropertyTrees(Layer* layer);
203 CC_EXPORT PropertyTrees* GetPropertyTrees(LayerImpl* layer); 213 CC_EXPORT PropertyTrees* GetPropertyTrees(LayerImpl* layer);
204 214
205 } // namespace cc 215 } // namespace cc
206 216
207 #endif // CC_TREES_LAYER_TREE_HOST_COMMON_H_ 217 #endif // CC_TREES_LAYER_TREE_HOST_COMMON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698