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

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

Issue 2445093002: cc/blimp: Add synchronization for scroll/scale state. (Closed)
Patch Set: fix rebase upload 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 struct ScrollUpdate {
161 int layer_id = Layer::LayerIdLabels::INVALID_ID;
162 gfx::Vector2dF scroll_delta;
163 };
164
165 ReflectedMainFrameState();
166 ~ReflectedMainFrameState();
167
168 std::vector<ScrollUpdate> scrolls;
169 float page_scale_delta;
170 };
171
157 struct CC_EXPORT ScrollAndScaleSet { 172 struct CC_EXPORT ScrollAndScaleSet {
158 ScrollAndScaleSet(); 173 ScrollAndScaleSet();
159 ~ScrollAndScaleSet(); 174 ~ScrollAndScaleSet();
160 175
161 // The inner viewport scroll delta is kept separate since it's special. 176 // The inner viewport scroll delta is kept separate since it's special.
162 // Because the inner (visual) viewport's maximum offset depends on the 177 // 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 178 // current page scale, the two must be committed at the same time to prevent
164 // clamping. 179 // clamping.
165 LayerTreeHostCommon::ScrollUpdateInfo inner_viewport_scroll; 180 LayerTreeHostCommon::ScrollUpdateInfo inner_viewport_scroll;
166 181
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 function(tree_impl->LayerById(id)); 213 function(tree_impl->LayerById(id));
199 } 214 }
200 } 215 }
201 216
202 CC_EXPORT PropertyTrees* GetPropertyTrees(Layer* layer); 217 CC_EXPORT PropertyTrees* GetPropertyTrees(Layer* layer);
203 CC_EXPORT PropertyTrees* GetPropertyTrees(LayerImpl* layer); 218 CC_EXPORT PropertyTrees* GetPropertyTrees(LayerImpl* layer);
204 219
205 } // namespace cc 220 } // namespace cc
206 221
207 #endif // CC_TREES_LAYER_TREE_HOST_COMMON_H_ 222 #endif // CC_TREES_LAYER_TREE_HOST_COMMON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698