| 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 PropertyTreeState_h |
| 6 #define PropertyTreeState_h | 6 #define PropertyTreeState_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" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 } | 48 } |
| 49 | 49 |
| 50 const EffectPaintPropertyNode* effect() const { | 50 const EffectPaintPropertyNode* effect() const { |
| 51 DCHECK(!m_effect || !m_effect->hasOneRef()); | 51 DCHECK(!m_effect || !m_effect->hasOneRef()); |
| 52 return m_effect.get(); | 52 return m_effect.get(); |
| 53 } | 53 } |
| 54 void setEffect(RefPtr<const EffectPaintPropertyNode> node) { | 54 void setEffect(RefPtr<const EffectPaintPropertyNode> node) { |
| 55 m_effect = std::move(node); | 55 m_effect = std::move(node); |
| 56 } | 56 } |
| 57 | 57 |
| 58 static const PropertyTreeState& root(); |
| 59 |
| 58 // Returns the compositor element id, if any, for this property state. If | 60 // Returns the compositor element id, if any, for this property state. If |
| 59 // neither the effect nor transform nodes have a compositor element id then a | 61 // neither the effect nor transform nodes have a compositor element id then a |
| 60 // default instance is returned. | 62 // default instance is returned. |
| 61 const CompositorElementId compositorElementId() const; | 63 const CompositorElementId compositorElementId() const; |
| 62 | 64 |
| 63 enum InnermostNode { | 65 enum InnermostNode { |
| 64 None, // None means that all nodes are their root values | 66 None, // None means that all nodes are their root values |
| 65 Transform, | 67 Transform, |
| 66 Clip, | 68 Clip, |
| 67 Effect, | 69 Effect, |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 } | 178 } |
| 177 | 179 |
| 178 HashMap<const PropertyTreeNode*, String> m_nodeToDebugString; | 180 HashMap<const PropertyTreeNode*, String> m_nodeToDebugString; |
| 179 }; | 181 }; |
| 180 | 182 |
| 181 #endif | 183 #endif |
| 182 | 184 |
| 183 } // namespace blink | 185 } // namespace blink |
| 184 | 186 |
| 185 #endif // PropertyTreeState_h | 187 #endif // PropertyTreeState_h |
| OLD | NEW |