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 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 // computing visible rects, and |clip_in_target_space| is used for computing | 42 // computing visible rects, and |clip_in_target_space| is used for computing |
43 // clips applied at draw time. Both rects are expressed in the space of the | 43 // clips applied at draw time. Both rects are expressed in the space of the |
44 // target transform node, and may include clips contributed by ancestors. | 44 // target transform node, and may include clips contributed by ancestors. |
45 gfx::RectF combined_clip_in_target_space; | 45 gfx::RectF combined_clip_in_target_space; |
46 gfx::RectF clip_in_target_space; | 46 gfx::RectF clip_in_target_space; |
47 | 47 |
48 // The id of the transform node that defines the clip node's local space. | 48 // The id of the transform node that defines the clip node's local space. |
49 int transform_id; | 49 int transform_id; |
50 | 50 |
51 // The id of the transform node that defines the clip node's target space. | 51 // The id of the transform node that defines the clip node's target space. |
52 int target_id; | 52 int target_transform_id; |
| 53 |
| 54 // The id of the effect node that defines the clip node's target space. |
| 55 int target_effect_id; |
53 | 56 |
54 // Whether this node contributes a new clip (that is, whether |clip| needs to | 57 // Whether this node contributes a new clip (that is, whether |clip| needs to |
55 // be applied), rather than only inheriting ancestor clips. | 58 // be applied), rather than only inheriting ancestor clips. |
56 bool applies_local_clip : 1; | 59 bool applies_local_clip : 1; |
57 | 60 |
58 // When true, |clip_in_target_space| does not include clips from ancestor | 61 // When true, |clip_in_target_space| does not include clips from ancestor |
59 // nodes. | 62 // nodes. |
60 bool layer_clipping_uses_only_local_clip : 1; | 63 bool layer_clipping_uses_only_local_clip : 1; |
61 | 64 |
62 // True if target surface needs to be drawn with a clip applied. | 65 // True if target surface needs to be drawn with a clip applied. |
(...skipping 10 matching lines...) Expand all Loading... |
73 bool operator==(const ClipNode& other) const; | 76 bool operator==(const ClipNode& other) const; |
74 | 77 |
75 void ToProtobuf(proto::TreeNode* proto) const; | 78 void ToProtobuf(proto::TreeNode* proto) const; |
76 void FromProtobuf(const proto::TreeNode& proto); | 79 void FromProtobuf(const proto::TreeNode& proto); |
77 void AsValueInto(base::trace_event::TracedValue* value) const; | 80 void AsValueInto(base::trace_event::TracedValue* value) const; |
78 }; | 81 }; |
79 | 82 |
80 } // namespace cc | 83 } // namespace cc |
81 | 84 |
82 #endif // CC_TREES_CLIP_NODE_H_ | 85 #endif // CC_TREES_CLIP_NODE_H_ |
OLD | NEW |