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 <limits> | 8 #include <limits> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "cc/base/cc_export.h" | 13 #include "cc/base/cc_export.h" |
14 #include "cc/base/scoped_ptr_vector.h" | 14 #include "cc/base/scoped_ptr_vector.h" |
15 #include "cc/layers/layer_lists.h" | 15 #include "cc/layers/layer_lists.h" |
16 #include "ui/gfx/geometry/scroll_offset.h" | |
danakj
2014/09/25 22:01:26
not needed? move to .cc
Yufeng Shen (Slow to review)
2014/09/26 20:19:07
Done.
| |
16 #include "ui/gfx/rect.h" | 17 #include "ui/gfx/rect.h" |
17 #include "ui/gfx/transform.h" | 18 #include "ui/gfx/transform.h" |
18 #include "ui/gfx/vector2d.h" | 19 #include "ui/gfx/vector2d.h" |
19 | 20 |
20 namespace cc { | 21 namespace cc { |
21 | 22 |
22 class LayerImpl; | 23 class LayerImpl; |
23 class Layer; | 24 class Layer; |
24 class SwapPromise; | 25 class SwapPromise; |
25 | 26 |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
123 return layers[index]; | 124 return layers[index]; |
124 } | 125 } |
125 | 126 |
126 static LayerImpl* get_layer_as_raw_ptr(const LayerImplList& layers, | 127 static LayerImpl* get_layer_as_raw_ptr(const LayerImplList& layers, |
127 size_t index) { | 128 size_t index) { |
128 return layers[index]; | 129 return layers[index]; |
129 } | 130 } |
130 | 131 |
131 struct ScrollUpdateInfo { | 132 struct ScrollUpdateInfo { |
132 int layer_id; | 133 int layer_id; |
133 gfx::Vector2d scroll_delta; | 134 gfx::Vector2dF scroll_delta; |
134 }; | 135 }; |
135 }; | 136 }; |
136 | 137 |
137 struct CC_EXPORT ScrollAndScaleSet { | 138 struct CC_EXPORT ScrollAndScaleSet { |
138 ScrollAndScaleSet(); | 139 ScrollAndScaleSet(); |
139 ~ScrollAndScaleSet(); | 140 ~ScrollAndScaleSet(); |
140 | 141 |
141 std::vector<LayerTreeHostCommon::ScrollUpdateInfo> scrolls; | 142 std::vector<LayerTreeHostCommon::ScrollUpdateInfo> scrolls; |
142 float page_scale_delta; | 143 float page_scale_delta; |
143 float top_controls_delta; | 144 float top_controls_delta; |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
248 false, | 249 false, |
249 render_surface_layer_list, | 250 render_surface_layer_list, |
250 0) { | 251 0) { |
251 DCHECK(root_layer); | 252 DCHECK(root_layer); |
252 DCHECK(render_surface_layer_list); | 253 DCHECK(render_surface_layer_list); |
253 } | 254 } |
254 | 255 |
255 } // namespace cc | 256 } // namespace cc |
256 | 257 |
257 #endif // CC_TREES_LAYER_TREE_HOST_COMMON_H_ | 258 #endif // CC_TREES_LAYER_TREE_HOST_COMMON_H_ |
OLD | NEW |