| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 ObjectPaintProperties_h | 5 #ifndef ObjectPaintProperties_h |
| 6 #define ObjectPaintProperties_h | 6 #define ObjectPaintProperties_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "platform/geometry/LayoutPoint.h" | 9 #include "platform/geometry/LayoutPoint.h" |
| 10 #include "platform/graphics/paint/ClipPaintPropertyNode.h" | 10 #include "platform/graphics/paint/ClipPaintPropertyNode.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 // inherit from the containing block chain instead of the painting parent and | 144 // inherit from the containing block chain instead of the painting parent and |
| 145 // cannot be derived in O(1) during the paint walk. For example: | 145 // cannot be derived in O(1) during the paint walk. For example: |
| 146 // <div style='opacity: 0.3;'/> would have a propertyTreeState.effect() | 146 // <div style='opacity: 0.3;'/> would have a propertyTreeState.effect() |
| 147 // with opacity of 0.3 which was created by the div itself. Note that | 147 // with opacity of 0.3 which was created by the div itself. Note that |
| 148 // propertyTreeState.transform() would not be null but would instead point to | 148 // propertyTreeState.transform() would not be null but would instead point to |
| 149 // the transform space setup by div's ancestors. | 149 // the transform space setup by div's ancestors. |
| 150 const PropertyTreeState* localBorderBoxProperties() const { | 150 const PropertyTreeState* localBorderBoxProperties() const { |
| 151 return m_localBorderBoxProperties.get(); | 151 return m_localBorderBoxProperties.get(); |
| 152 } | 152 } |
| 153 | 153 |
| 154 bool hasContentsProperties() const { |
| 155 return !!m_contentsProperties; |
| 156 } |
| 157 |
| 154 // This is the complete set of property nodes that can be used to paint the | 158 // This is the complete set of property nodes that can be used to paint the |
| 155 // contents of this object. It is similar to localBorderBoxProperties but | 159 // contents of this object. It is similar to localBorderBoxProperties but |
| 156 // includes properties (e.g., overflow clip, scroll translation) that apply to | 160 // includes properties (e.g., overflow clip, scroll translation) that apply to |
| 157 // contents. This is suitable for paint invalidation. | 161 // contents. This is suitable for paint invalidation. |
| 158 const PropertyTreeState* contentsProperties() const { | 162 const PropertyTreeState* contentsProperties() const { |
| 159 if (!m_contentsProperties) { | 163 if (!m_contentsProperties) { |
| 160 if (!m_localBorderBoxProperties) | 164 if (!m_localBorderBoxProperties) |
| 161 return nullptr; | 165 return nullptr; |
| 162 updateContentsProperties(); | 166 updateContentsProperties(); |
| 163 } else { | 167 } else { |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 RefPtr<TransformPaintPropertyNode> m_scrollTranslation; | 380 RefPtr<TransformPaintPropertyNode> m_scrollTranslation; |
| 377 RefPtr<TransformPaintPropertyNode> m_scrollbarPaintOffset; | 381 RefPtr<TransformPaintPropertyNode> m_scrollbarPaintOffset; |
| 378 | 382 |
| 379 std::unique_ptr<PropertyTreeState> m_localBorderBoxProperties; | 383 std::unique_ptr<PropertyTreeState> m_localBorderBoxProperties; |
| 380 mutable std::unique_ptr<PropertyTreeState> m_contentsProperties; | 384 mutable std::unique_ptr<PropertyTreeState> m_contentsProperties; |
| 381 }; | 385 }; |
| 382 | 386 |
| 383 } // namespace blink | 387 } // namespace blink |
| 384 | 388 |
| 385 #endif // ObjectPaintProperties_h | 389 #endif // ObjectPaintProperties_h |
| OLD | NEW |