Chromium Code Reviews| 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/ScrollPaintPropertyNode.h" | 10 #include "platform/graphics/paint/ScrollPaintPropertyNode.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 61 } | 61 } |
| 62 | 62 |
| 63 const ScrollPaintPropertyNode* scroll() const { | 63 const ScrollPaintPropertyNode* scroll() const { |
| 64 DCHECK(!m_scroll || !m_scroll->hasOneRef()); | 64 DCHECK(!m_scroll || !m_scroll->hasOneRef()); |
| 65 return m_scroll.get(); | 65 return m_scroll.get(); |
| 66 } | 66 } |
| 67 void setScroll(RefPtr<const ScrollPaintPropertyNode> node) { | 67 void setScroll(RefPtr<const ScrollPaintPropertyNode> node) { |
| 68 m_scroll = std::move(node); | 68 m_scroll = std::move(node); |
| 69 } | 69 } |
| 70 | 70 |
| 71 // Returns the compositor element id, if any, for this property state. If none | |
| 72 // of the scroll, effect or transform nodes for this state have a compositor | |
| 73 // element id then a default instance is returned. | |
| 74 const CompositorElementId compositorElementId() const; | |
|
wkorman
2017/01/20 00:56:38
We could put this logic in PaintArtifactCompositor
| |
| 75 | |
| 71 enum InnermostNode { | 76 enum InnermostNode { |
| 72 None, // None means that all nodes are their root values | 77 None, // None means that all nodes are their root values |
| 73 Transform, | 78 Transform, |
| 74 Clip, | 79 Clip, |
| 75 Effect, | 80 Effect, |
| 76 }; | 81 }; |
| 77 | 82 |
| 78 // There is always a well-defined order in which the transform, clip | 83 // There is always a well-defined order in which the transform, clip |
| 79 // and effects of a PropertyTreeState apply. This method returns which | 84 // and effects of a PropertyTreeState apply. This method returns which |
| 80 // of them applies first to content drawn with this PropertyTreeState. | 85 // of them applies first to content drawn with this PropertyTreeState. |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 135 : m_properties(properties) {} | 140 : m_properties(properties) {} |
| 136 const PropertyTreeState* next(); | 141 const PropertyTreeState* next(); |
| 137 | 142 |
| 138 private: | 143 private: |
| 139 PropertyTreeState m_properties; | 144 PropertyTreeState m_properties; |
| 140 }; | 145 }; |
| 141 | 146 |
| 142 } // namespace blink | 147 } // namespace blink |
| 143 | 148 |
| 144 #endif // PropertyTreeState_h | 149 #endif // PropertyTreeState_h |
| OLD | NEW |