| OLD | NEW |
| 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 int layer_id; | 154 int layer_id; |
| 155 bool hidden; | 155 bool hidden; |
| 156 | 156 |
| 157 ScrollbarsUpdateInfo(); | 157 ScrollbarsUpdateInfo(); |
| 158 ScrollbarsUpdateInfo(int layer_id, bool hidden); | 158 ScrollbarsUpdateInfo(int layer_id, bool hidden); |
| 159 | 159 |
| 160 bool operator==(const ScrollbarsUpdateInfo& other) const; | 160 bool operator==(const ScrollbarsUpdateInfo& other) const; |
| 161 }; | 161 }; |
| 162 }; | 162 }; |
| 163 | 163 |
| 164 // A container for the state that was reported to the main thread during | |
| 165 // BeginMainFrame, but could not be applied/resolved on the main thread. | |
| 166 struct CC_EXPORT ReflectedMainFrameState { | |
| 167 struct ScrollUpdate { | |
| 168 int layer_id = Layer::LayerIdLabels::INVALID_ID; | |
| 169 gfx::Vector2dF scroll_delta; | |
| 170 }; | |
| 171 | |
| 172 ReflectedMainFrameState(); | |
| 173 ~ReflectedMainFrameState(); | |
| 174 | |
| 175 std::vector<ScrollUpdate> scrolls; | |
| 176 float page_scale_delta; | |
| 177 }; | |
| 178 | |
| 179 struct CC_EXPORT ScrollAndScaleSet { | 164 struct CC_EXPORT ScrollAndScaleSet { |
| 180 ScrollAndScaleSet(); | 165 ScrollAndScaleSet(); |
| 181 ~ScrollAndScaleSet(); | 166 ~ScrollAndScaleSet(); |
| 182 | 167 |
| 183 // The inner viewport scroll delta is kept separate since it's special. | 168 // The inner viewport scroll delta is kept separate since it's special. |
| 184 // Because the inner (visual) viewport's maximum offset depends on the | 169 // Because the inner (visual) viewport's maximum offset depends on the |
| 185 // current page scale, the two must be committed at the same time to prevent | 170 // current page scale, the two must be committed at the same time to prevent |
| 186 // clamping. | 171 // clamping. |
| 187 LayerTreeHostCommon::ScrollUpdateInfo inner_viewport_scroll; | 172 LayerTreeHostCommon::ScrollUpdateInfo inner_viewport_scroll; |
| 188 | 173 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 217 function(tree_impl->LayerById(id)); | 202 function(tree_impl->LayerById(id)); |
| 218 } | 203 } |
| 219 } | 204 } |
| 220 | 205 |
| 221 CC_EXPORT PropertyTrees* GetPropertyTrees(Layer* layer); | 206 CC_EXPORT PropertyTrees* GetPropertyTrees(Layer* layer); |
| 222 CC_EXPORT PropertyTrees* GetPropertyTrees(LayerImpl* layer); | 207 CC_EXPORT PropertyTrees* GetPropertyTrees(LayerImpl* layer); |
| 223 | 208 |
| 224 } // namespace cc | 209 } // namespace cc |
| 225 | 210 |
| 226 #endif // CC_TREES_LAYER_TREE_HOST_COMMON_H_ | 211 #endif // CC_TREES_LAYER_TREE_HOST_COMMON_H_ |
| OLD | NEW |