| 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_CLIP_NODE_H_ | 5 #ifndef CC_TREES_CLIP_NODE_H_ |
| 6 #define CC_TREES_CLIP_NODE_H_ | 6 #define CC_TREES_CLIP_NODE_H_ |
| 7 | 7 |
| 8 #include "cc/base/cc_export.h" | 8 #include "cc/base/cc_export.h" |
| 9 #include "ui/gfx/geometry/rect_f.h" | 9 #include "ui/gfx/geometry/rect_f.h" |
| 10 | 10 |
| 11 namespace base { | 11 namespace base { |
| 12 namespace trace_event { | 12 namespace trace_event { |
| 13 class TracedValue; | 13 class TracedValue; |
| 14 } // namespace trace_event | 14 } // namespace trace_event |
| 15 } // namespace base | 15 } // namespace base |
| 16 | 16 |
| 17 namespace cc { | 17 namespace cc { |
| 18 | 18 |
| 19 struct CC_EXPORT ClipNode { | 19 struct CC_EXPORT ClipNode { |
| 20 ClipNode(); | 20 ClipNode(); |
| 21 ClipNode(const ClipNode& other); | 21 ClipNode(const ClipNode& other); |
| 22 | 22 |
| 23 // The node index of this node in the clip tree node vector. |
| 23 int id; | 24 int id; |
| 25 // The node index of the parent node in the clip tree node vector. |
| 24 int parent_id; | 26 int parent_id; |
| 25 int owner_id; | 27 // The layer id of the layer that owns this node. |
| 28 int owning_layer_id; |
| 26 | 29 |
| 27 enum class ClipType { | 30 enum class ClipType { |
| 28 // The node doesn't contribute a new clip. It exists only for caching clips | 31 // The node doesn't contribute a new clip. It exists only for caching clips |
| 29 // or for resetting clipping state. | 32 // or for resetting clipping state. |
| 30 NONE, | 33 NONE, |
| 31 | 34 |
| 32 // The node contributes a new clip (that is, |clip| needs to be applied). | 35 // The node contributes a new clip (that is, |clip| needs to be applied). |
| 33 APPLIES_LOCAL_CLIP | 36 APPLIES_LOCAL_CLIP |
| 34 }; | 37 }; |
| 35 | 38 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 bool resets_clip : 1; | 80 bool resets_clip : 1; |
| 78 | 81 |
| 79 bool operator==(const ClipNode& other) const; | 82 bool operator==(const ClipNode& other) const; |
| 80 | 83 |
| 81 void AsValueInto(base::trace_event::TracedValue* value) const; | 84 void AsValueInto(base::trace_event::TracedValue* value) const; |
| 82 }; | 85 }; |
| 83 | 86 |
| 84 } // namespace cc | 87 } // namespace cc |
| 85 | 88 |
| 86 #endif // CC_TREES_CLIP_NODE_H_ | 89 #endif // CC_TREES_CLIP_NODE_H_ |
| OLD | NEW |