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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
170 // 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 |
171 // clamping. | 171 // clamping. |
172 LayerTreeHostCommon::ScrollUpdateInfo inner_viewport_scroll; | 172 LayerTreeHostCommon::ScrollUpdateInfo inner_viewport_scroll; |
173 | 173 |
174 std::vector<LayerTreeHostCommon::ScrollUpdateInfo> scrolls; | 174 std::vector<LayerTreeHostCommon::ScrollUpdateInfo> scrolls; |
175 float page_scale_delta; | 175 float page_scale_delta; |
176 gfx::Vector2dF elastic_overscroll_delta; | 176 gfx::Vector2dF elastic_overscroll_delta; |
177 float top_controls_delta; | 177 float top_controls_delta; |
178 std::vector<LayerTreeHostCommon::ScrollbarsUpdateInfo> scrollbars; | 178 std::vector<LayerTreeHostCommon::ScrollbarsUpdateInfo> scrollbars; |
179 std::vector<std::unique_ptr<SwapPromise>> swap_promises; | 179 std::vector<std::unique_ptr<SwapPromise>> swap_promises; |
180 uint32_t scroll_source_info; | |
danakj
2017/03/10 20:52:48
Why did you go with a bitmask here instead of 2 bo
sahel
2017/03/13 20:13:43
If other types of scrolling (e.g. keyboard) are ha
danakj
2017/03/13 20:16:23
I don't see how a bitflag is any more extendable t
sahel
2017/03/13 21:03:52
what I meant is: if I want to add other sources of
danakj
2017/03/13 22:29:15
Optimize for the reader, not the writer. A uint32_
sahel
2017/03/16 12:58:26
Done.
| |
180 | 181 |
181 private: | 182 private: |
182 DISALLOW_COPY_AND_ASSIGN(ScrollAndScaleSet); | 183 DISALLOW_COPY_AND_ASSIGN(ScrollAndScaleSet); |
183 }; | 184 }; |
184 | 185 |
185 template <typename Function> | 186 template <typename Function> |
186 void LayerTreeHostCommon::CallFunctionForEveryLayer(LayerTreeHost* host, | 187 void LayerTreeHostCommon::CallFunctionForEveryLayer(LayerTreeHost* host, |
187 const Function& function) { | 188 const Function& function) { |
188 for (auto* layer : *host) { | 189 for (auto* layer : *host) { |
189 function(layer); | 190 function(layer); |
(...skipping 12 matching lines...) Expand all Loading... | |
202 function(tree_impl->LayerById(id)); | 203 function(tree_impl->LayerById(id)); |
203 } | 204 } |
204 } | 205 } |
205 | 206 |
206 CC_EXPORT PropertyTrees* GetPropertyTrees(Layer* layer); | 207 CC_EXPORT PropertyTrees* GetPropertyTrees(Layer* layer); |
207 CC_EXPORT PropertyTrees* GetPropertyTrees(LayerImpl* layer); | 208 CC_EXPORT PropertyTrees* GetPropertyTrees(LayerImpl* layer); |
208 | 209 |
209 } // namespace cc | 210 } // namespace cc |
210 | 211 |
211 #endif // CC_TREES_LAYER_TREE_HOST_COMMON_H_ | 212 #endif // CC_TREES_LAYER_TREE_HOST_COMMON_H_ |
OLD | NEW |