| 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 | 140 |
| 141 void ToProtobuf(proto::ScrollUpdateInfo* proto) const; | 141 void ToProtobuf(proto::ScrollUpdateInfo* proto) const; |
| 142 void FromProtobuf(const proto::ScrollUpdateInfo& proto); | 142 void FromProtobuf(const proto::ScrollUpdateInfo& proto); |
| 143 }; | 143 }; |
| 144 }; | 144 }; |
| 145 | 145 |
| 146 struct CC_EXPORT ScrollAndScaleSet { | 146 struct CC_EXPORT ScrollAndScaleSet { |
| 147 ScrollAndScaleSet(); | 147 ScrollAndScaleSet(); |
| 148 ~ScrollAndScaleSet(); | 148 ~ScrollAndScaleSet(); |
| 149 | 149 |
| 150 // The inner viewport scroll delta is kept separate since it's special. |
| 151 // Because the inner (visual) viewport's maximum offset depends on the |
| 152 // current page scale, the two must be committed at the same time to prevent |
| 153 // clamping. |
| 154 LayerTreeHostCommon::ScrollUpdateInfo inner_viewport_scroll; |
| 155 |
| 150 std::vector<LayerTreeHostCommon::ScrollUpdateInfo> scrolls; | 156 std::vector<LayerTreeHostCommon::ScrollUpdateInfo> scrolls; |
| 151 float page_scale_delta; | 157 float page_scale_delta; |
| 152 gfx::Vector2dF elastic_overscroll_delta; | 158 gfx::Vector2dF elastic_overscroll_delta; |
| 153 float top_controls_delta; | 159 float top_controls_delta; |
| 154 std::vector<std::unique_ptr<SwapPromise>> swap_promises; | 160 std::vector<std::unique_ptr<SwapPromise>> swap_promises; |
| 155 | 161 |
| 156 bool EqualsForTesting(const ScrollAndScaleSet& other) const; | 162 bool EqualsForTesting(const ScrollAndScaleSet& other) const; |
| 157 void ToProtobuf(proto::ScrollAndScaleSet* proto) const; | 163 void ToProtobuf(proto::ScrollAndScaleSet* proto) const; |
| 158 void FromProtobuf(const proto::ScrollAndScaleSet& proto); | 164 void FromProtobuf(const proto::ScrollAndScaleSet& proto); |
| 159 | 165 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 187 function(tree_impl->LayerById(id)); | 193 function(tree_impl->LayerById(id)); |
| 188 } | 194 } |
| 189 } | 195 } |
| 190 | 196 |
| 191 CC_EXPORT PropertyTrees* GetPropertyTrees(Layer* layer); | 197 CC_EXPORT PropertyTrees* GetPropertyTrees(Layer* layer); |
| 192 CC_EXPORT PropertyTrees* GetPropertyTrees(LayerImpl* layer); | 198 CC_EXPORT PropertyTrees* GetPropertyTrees(LayerImpl* layer); |
| 193 | 199 |
| 194 } // namespace cc | 200 } // namespace cc |
| 195 | 201 |
| 196 #endif // CC_TREES_LAYER_TREE_HOST_COMMON_H_ | 202 #endif // CC_TREES_LAYER_TREE_HOST_COMMON_H_ |
| OLD | NEW |