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 PropertyTreeState_h | 5 #ifndef GeometryPropertyTreeState_h |
6 #define PropertyTreeState_h | 6 #define GeometryPropertyTreeState_h |
7 | 7 |
8 #include "platform/graphics/paint/ClipPaintPropertyNode.h" | 8 #include "platform/graphics/paint/ClipPaintPropertyNode.h" |
9 #include "platform/graphics/paint/EffectPaintPropertyNode.h" | 9 #include "platform/graphics/paint/EffectPaintPropertyNode.h" |
10 #include "platform/graphics/paint/TransformPaintPropertyNode.h" | 10 #include "platform/graphics/paint/TransformPaintPropertyNode.h" |
11 #include "wtf/HashFunctions.h" | 11 #include "wtf/HashFunctions.h" |
12 #include "wtf/HashTraits.h" | 12 #include "wtf/HashTraits.h" |
13 | 13 |
14 namespace blink { | 14 namespace blink { |
15 | 15 |
16 // Represents the combination of transform, clip and effect nodes for a particul
ar coordinate space. | 16 // Represents the combination of transform, clip and effect nodes for a particul
ar coordinate space. |
17 // See GeometryMapper. | 17 // See GeometryMapper. Scroll nodes (ScrollPaintPropertyNode) are not needed for
mapping geometry |
18 // Scroll nodes (ScrollPaintPropertyNode) are not needed for mapping geometry an
d have been left off | 18 // and have been left off of this structure. |
19 // of this structure. | 19 struct GeometryPropertyTreeState { |
20 // TODO(pdr): Rename this GeometryPropertyTreeState. | 20 GeometryPropertyTreeState() : GeometryPropertyTreeState(nullptr, nullptr, nu
llptr) {} |
21 struct PropertyTreeState { | |
22 PropertyTreeState() : PropertyTreeState(nullptr, nullptr, nullptr) {} | |
23 | 21 |
24 PropertyTreeState( | 22 GeometryPropertyTreeState( |
25 const TransformPaintPropertyNode* transform, | 23 const TransformPaintPropertyNode* transform, |
26 const ClipPaintPropertyNode* clip, | 24 const ClipPaintPropertyNode* clip, |
27 const EffectPaintPropertyNode* effect) | 25 const EffectPaintPropertyNode* effect) |
28 : transform(transform), clip(clip), effect(effect) {} | 26 : transform(transform), clip(clip), effect(effect) {} |
29 | 27 |
30 RefPtr<const TransformPaintPropertyNode> transform; | 28 RefPtr<const TransformPaintPropertyNode> transform; |
31 RefPtr<const ClipPaintPropertyNode> clip; | 29 RefPtr<const ClipPaintPropertyNode> clip; |
32 RefPtr<const EffectPaintPropertyNode> effect; | 30 RefPtr<const EffectPaintPropertyNode> effect; |
33 }; | 31 }; |
34 | 32 |
(...skipping 30 matching lines...) Expand all Loading... |
65 // Walk up until we find the ancestor. | 63 // Walk up until we find the ancestor. |
66 while (a != b) { | 64 while (a != b) { |
67 a = a->parent(); | 65 a = a->parent(); |
68 b = b->parent(); | 66 b = b->parent(); |
69 } | 67 } |
70 return a; | 68 return a; |
71 } | 69 } |
72 | 70 |
73 } // namespace blink | 71 } // namespace blink |
74 | 72 |
75 #endif // PropertyTreeState_h | 73 #endif // GeometryPropertyTreeState_h |
OLD | NEW |