OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_SCROLL_NODE_H_ | 5 #ifndef CC_TREES_SCROLL_NODE_H_ |
6 #define CC_TREES_SCROLL_NODE_H_ | 6 #define CC_TREES_SCROLL_NODE_H_ |
7 | 7 |
8 #include "cc/base/filter_operations.h" | 8 #include "cc/base/filter_operations.h" |
9 #include "cc/base/region.h" | 9 #include "cc/base/region.h" |
10 #include "cc/cc_export.h" | 10 #include "cc/cc_export.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 // The node index of this node in the scroll tree node vector. | 25 // The node index of this node in the scroll tree node vector. |
26 int id; | 26 int id; |
27 // The node index of the parent node in the scroll tree node vector. | 27 // The node index of the parent node in the scroll tree node vector. |
28 int parent_id; | 28 int parent_id; |
29 | 29 |
30 // The layer id that corresponds to the layer contents that are scrolled. | 30 // The layer id that corresponds to the layer contents that are scrolled. |
31 // Unlike |id|, this id is stable across frames that don't change the | 31 // Unlike |id|, this id is stable across frames that don't change the |
32 // composited layer list. | 32 // composited layer list. |
33 int owning_layer_id; | 33 int owning_layer_id; |
34 | 34 |
35 // This is used for subtrees that should not be scrolled independently. For | |
36 // example, when there is a layer that is not scrollable itself but is inside | |
37 // a scrolling layer. | |
38 bool scrollable; | |
39 | |
40 uint32_t main_thread_scrolling_reasons; | 35 uint32_t main_thread_scrolling_reasons; |
41 | 36 |
42 Region non_fast_scrollable_region; | 37 Region non_fast_scrollable_region; |
43 | 38 |
44 // Size of the clipped area, not including non-overlay scrollbars. Overlay | 39 // Size of the clipped area, not including non-overlay scrollbars. Overlay |
45 // scrollbars do not affect the clipped area. | 40 // scrollbars do not affect the clipped area. |
46 gfx::Size scroll_clip_layer_bounds; | 41 gfx::Size scroll_clip_layer_bounds; |
47 | 42 |
48 // Bounds of the overflow scrolling area. | 43 // Bounds of the overflow scrolling area. |
49 gfx::Size bounds; | 44 gfx::Size bounds; |
50 | 45 |
51 bool max_scroll_offset_affected_by_page_scale; | 46 // This is used for subtrees that should not be scrolled independently. For |
52 bool scrolls_inner_viewport; | 47 // example, when there is a layer that is not scrollable itself but is inside |
53 bool scrolls_outer_viewport; | 48 // a scrolling layer. |
| 49 bool scrollable : 1; |
| 50 bool max_scroll_offset_affected_by_page_scale : 1; |
| 51 bool scrolls_inner_viewport : 1; |
| 52 bool scrolls_outer_viewport : 1; |
| 53 bool should_flatten : 1; |
| 54 bool user_scrollable_horizontal : 1; |
| 55 bool user_scrollable_vertical : 1; |
54 | 56 |
55 // This offset is used when |scrollable| is false and there isn't a transform | 57 // This offset is used when |scrollable| is false and there isn't a transform |
56 // node already present that covers this offset. | 58 // node already present that covers this offset. |
57 gfx::Vector2dF offset_to_transform_parent; | 59 gfx::Vector2dF offset_to_transform_parent; |
58 | 60 |
59 bool should_flatten; | |
60 bool user_scrollable_horizontal; | |
61 bool user_scrollable_vertical; | |
62 ElementId element_id; | 61 ElementId element_id; |
63 int transform_id; | 62 int transform_id; |
64 | 63 |
65 bool operator==(const ScrollNode& other) const; | 64 bool operator==(const ScrollNode& other) const; |
66 void AsValueInto(base::trace_event::TracedValue* value) const; | 65 void AsValueInto(base::trace_event::TracedValue* value) const; |
67 }; | 66 }; |
68 | 67 |
69 } // namespace cc | 68 } // namespace cc |
70 | 69 |
71 #endif // CC_TREES_SCROLL_NODE_H_ | 70 #endif // CC_TREES_SCROLL_NODE_H_ |
OLD | NEW |