| 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/output/filter_operations.h" | 9 #include "cc/output/filter_operations.h" |
| 10 #include "ui/gfx/geometry/size.h" | 10 #include "ui/gfx/geometry/size.h" |
| 11 | 11 |
| 12 namespace base { | 12 namespace base { |
| 13 namespace trace_event { | 13 namespace trace_event { |
| 14 class TracedValue; | 14 class TracedValue; |
| 15 } // namespace trace_event | 15 } // namespace trace_event |
| 16 } // namespace base | 16 } // namespace base |
| 17 | 17 |
| 18 namespace cc { | 18 namespace cc { |
| 19 | 19 |
| 20 struct CC_EXPORT ScrollNode { | 20 struct CC_EXPORT ScrollNode { |
| 21 ScrollNode(); | 21 ScrollNode(); |
| 22 ScrollNode(const ScrollNode& other); | 22 ScrollNode(const ScrollNode& other); |
| 23 | 23 |
| 24 // The node index of this node in the scroll tree node vector. |
| 24 int id; | 25 int id; |
| 26 // The node index of the parent node in the scroll tree node vector. |
| 25 int parent_id; | 27 int parent_id; |
| 26 | 28 |
| 27 // The layer id that corresponds to the layer contents that are scrolled. | 29 // The layer id that corresponds to the layer contents that are scrolled. |
| 28 // Unlike |id|, this id is stable across frames that don't change the | 30 // Unlike |id|, this id is stable across frames that don't change the |
| 29 // composited layer list. | 31 // composited layer list. |
| 30 int owner_id; | 32 int owning_layer_id; |
| 31 | 33 |
| 32 // This is used for subtrees that should not be scrolled independently. For | 34 // This is used for subtrees that should not be scrolled independently. For |
| 33 // example, when there is a layer that is not scrollable itself but is inside | 35 // example, when there is a layer that is not scrollable itself but is inside |
| 34 // a scrolling layer. | 36 // a scrolling layer. |
| 35 bool scrollable; | 37 bool scrollable; |
| 36 | 38 |
| 37 uint32_t main_thread_scrolling_reasons; | 39 uint32_t main_thread_scrolling_reasons; |
| 38 bool contains_non_fast_scrollable_region; | 40 bool contains_non_fast_scrollable_region; |
| 39 | 41 |
| 40 // Size of the clipped area, not including non-overlay scrollbars. Overlay | 42 // Size of the clipped area, not including non-overlay scrollbars. Overlay |
| (...skipping 17 matching lines...) Expand all Loading... |
| 58 ElementId element_id; | 60 ElementId element_id; |
| 59 int transform_id; | 61 int transform_id; |
| 60 | 62 |
| 61 bool operator==(const ScrollNode& other) const; | 63 bool operator==(const ScrollNode& other) const; |
| 62 void AsValueInto(base::trace_event::TracedValue* value) const; | 64 void AsValueInto(base::trace_event::TracedValue* value) const; |
| 63 }; | 65 }; |
| 64 | 66 |
| 65 } // namespace cc | 67 } // namespace cc |
| 66 | 68 |
| 67 #endif // CC_TREES_SCROLL_NODE_H_ | 69 #endif // CC_TREES_SCROLL_NODE_H_ |
| OLD | NEW |