| 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 namespace proto { | |
| 21 class TreeNode; | |
| 22 } // namespace proto | |
| 23 | |
| 24 struct CC_EXPORT ScrollNode { | 20 struct CC_EXPORT ScrollNode { |
| 25 ScrollNode(); | 21 ScrollNode(); |
| 26 ScrollNode(const ScrollNode& other); | 22 ScrollNode(const ScrollNode& other); |
| 27 | 23 |
| 28 int id; | 24 int id; |
| 29 int parent_id; | 25 int parent_id; |
| 30 | 26 |
| 31 // The layer id that corresponds to the layer contents that are scrolled. | 27 // The layer id that corresponds to the layer contents that are scrolled. |
| 32 // Unlike |id|, this id is stable across frames that don't change the | 28 // Unlike |id|, this id is stable across frames that don't change the |
| 33 // composited layer list. | 29 // composited layer list. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 58 | 54 |
| 59 bool should_flatten; | 55 bool should_flatten; |
| 60 bool user_scrollable_horizontal; | 56 bool user_scrollable_horizontal; |
| 61 bool user_scrollable_vertical; | 57 bool user_scrollable_vertical; |
| 62 ElementId element_id; | 58 ElementId element_id; |
| 63 int transform_id; | 59 int transform_id; |
| 64 // Number of drawn layers pointing to this node or any of its descendants. | 60 // Number of drawn layers pointing to this node or any of its descendants. |
| 65 int num_drawn_descendants; | 61 int num_drawn_descendants; |
| 66 | 62 |
| 67 bool operator==(const ScrollNode& other) const; | 63 bool operator==(const ScrollNode& other) const; |
| 68 | |
| 69 void ToProtobuf(proto::TreeNode* proto) const; | |
| 70 void FromProtobuf(const proto::TreeNode& proto); | |
| 71 void AsValueInto(base::trace_event::TracedValue* value) const; | 64 void AsValueInto(base::trace_event::TracedValue* value) const; |
| 72 }; | 65 }; |
| 73 | 66 |
| 74 } // namespace cc | 67 } // namespace cc |
| 75 | 68 |
| 76 #endif // CC_TREES_SCROLL_NODE_H_ | 69 #endif // CC_TREES_SCROLL_NODE_H_ |
| OLD | NEW |