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/cc_export.h" | 8 #include "cc/base/cc_export.h" |
| 9 #include "cc/base/region.h" |
9 #include "cc/output/filter_operations.h" | 10 #include "cc/output/filter_operations.h" |
10 #include "ui/gfx/geometry/size.h" | 11 #include "ui/gfx/geometry/size.h" |
11 | 12 |
12 namespace base { | 13 namespace base { |
13 namespace trace_event { | 14 namespace trace_event { |
14 class TracedValue; | 15 class TracedValue; |
15 } // namespace trace_event | 16 } // namespace trace_event |
16 } // namespace base | 17 } // namespace base |
17 | 18 |
18 namespace cc { | 19 namespace cc { |
(...skipping 11 matching lines...) Expand all Loading... |
30 // 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 |
31 // composited layer list. | 32 // composited layer list. |
32 int owning_layer_id; | 33 int owning_layer_id; |
33 | 34 |
34 // This is used for subtrees that should not be scrolled independently. For | 35 // This is used for subtrees that should not be scrolled independently. For |
35 // example, when there is a layer that is not scrollable itself but is inside | 36 // example, when there is a layer that is not scrollable itself but is inside |
36 // a scrolling layer. | 37 // a scrolling layer. |
37 bool scrollable; | 38 bool scrollable; |
38 | 39 |
39 uint32_t main_thread_scrolling_reasons; | 40 uint32_t main_thread_scrolling_reasons; |
40 bool contains_non_fast_scrollable_region; | 41 |
| 42 Region non_fast_scrollable_region; |
41 | 43 |
42 // Size of the clipped area, not including non-overlay scrollbars. Overlay | 44 // Size of the clipped area, not including non-overlay scrollbars. Overlay |
43 // scrollbars do not affect the clipped area. | 45 // scrollbars do not affect the clipped area. |
44 gfx::Size scroll_clip_layer_bounds; | 46 gfx::Size scroll_clip_layer_bounds; |
45 | 47 |
46 // Bounds of the overflow scrolling area. | 48 // Bounds of the overflow scrolling area. |
47 gfx::Size bounds; | 49 gfx::Size bounds; |
48 | 50 |
49 bool max_scroll_offset_affected_by_page_scale; | 51 bool max_scroll_offset_affected_by_page_scale; |
50 bool scrolls_inner_viewport; | 52 bool scrolls_inner_viewport; |
51 bool scrolls_outer_viewport; | 53 bool scrolls_outer_viewport; |
52 | 54 |
53 // This offset is used when |scrollable| is false and there isn't a transform | 55 // This offset is used when |scrollable| is false and there isn't a transform |
54 // node already present that covers this offset. | 56 // node already present that covers this offset. |
55 gfx::Vector2dF offset_to_transform_parent; | 57 gfx::Vector2dF offset_to_transform_parent; |
56 | 58 |
57 bool should_flatten; | 59 bool should_flatten; |
58 bool user_scrollable_horizontal; | 60 bool user_scrollable_horizontal; |
59 bool user_scrollable_vertical; | 61 bool user_scrollable_vertical; |
60 ElementId element_id; | 62 ElementId element_id; |
61 int transform_id; | 63 int transform_id; |
62 | 64 |
63 bool operator==(const ScrollNode& other) const; | 65 bool operator==(const ScrollNode& other) const; |
64 void AsValueInto(base::trace_event::TracedValue* value) const; | 66 void AsValueInto(base::trace_event::TracedValue* value) const; |
65 }; | 67 }; |
66 | 68 |
67 } // namespace cc | 69 } // namespace cc |
68 | 70 |
69 #endif // CC_TREES_SCROLL_NODE_H_ | 71 #endif // CC_TREES_SCROLL_NODE_H_ |
OLD | NEW |