| 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 PaintPropertyTreeBuilder_h | 5 #ifndef PaintPropertyTreeBuilder_h |
| 6 #define PaintPropertyTreeBuilder_h | 6 #define PaintPropertyTreeBuilder_h |
| 7 | 7 |
| 8 #include "platform/geometry/LayoutPoint.h" | 8 #include "platform/geometry/LayoutPoint.h" |
| 9 #include "platform/graphics/paint/ClipPaintPropertyNode.h" | 9 #include "platform/graphics/paint/ClipPaintPropertyNode.h" |
| 10 #include "platform/graphics/paint/EffectPaintPropertyNode.h" | 10 #include "platform/graphics/paint/EffectPaintPropertyNode.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 // clip. The cull rect for its input shall be derived from its output clip. | 83 // clip. The cull rect for its input shall be derived from its output clip. |
| 84 // This variable represents the input cull of current effect, also serves as | 84 // This variable represents the input cull of current effect, also serves as |
| 85 // output clip of child effects that don't have a hard clip. | 85 // output clip of child effects that don't have a hard clip. |
| 86 const ClipPaintPropertyNode* inputClipOfCurrentEffect; | 86 const ClipPaintPropertyNode* inputClipOfCurrentEffect; |
| 87 | 87 |
| 88 // True if a change has forced all properties in a subtree to be updated. This | 88 // True if a change has forced all properties in a subtree to be updated. This |
| 89 // can be set due to paint offset changes or when the structure of the | 89 // can be set due to paint offset changes or when the structure of the |
| 90 // property tree changes (i.e., a node is added or removed). | 90 // property tree changes (i.e., a node is added or removed). |
| 91 bool forceSubtreeUpdate; | 91 bool forceSubtreeUpdate; |
| 92 | 92 |
| 93 PaintPropertyTreeBuilderContext() | 93 // Initializes all property tree nodes to the roots. |
| 94 : containerForAbsolutePosition(nullptr), | 94 PaintPropertyTreeBuilderContext(); |
| 95 currentEffect(nullptr), | |
| 96 inputClipOfCurrentEffect(nullptr), | |
| 97 forceSubtreeUpdate(false) {} | |
| 98 }; | 95 }; |
| 99 | 96 |
| 100 // Creates paint property tree nodes for special things in the layout tree. | 97 // Creates paint property tree nodes for special things in the layout tree. |
| 101 // Special things include but not limit to: overflow clip, transform, fixed-pos, | 98 // Special things include but not limit to: overflow clip, transform, fixed-pos, |
| 102 // animation, mask, filter, ... etc. | 99 // animation, mask, filter, ... etc. |
| 103 // It expects to be invoked for each layout tree node in DOM order during | 100 // It expects to be invoked for each layout tree node in DOM order during |
| 104 // InPrePaint phase. | 101 // InPrePaint phase. |
| 105 class PaintPropertyTreeBuilder { | 102 class PaintPropertyTreeBuilder { |
| 106 public: | 103 public: |
| 107 void setupInitialContext(PaintPropertyTreeBuilderContext&); | 104 void setupInitialContext(PaintPropertyTreeBuilderContext&); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 const LayoutObject&, | 154 const LayoutObject&, |
| 158 PaintPropertyTreeBuilderContext&); | 155 PaintPropertyTreeBuilderContext&); |
| 159 ALWAYS_INLINE static void updateOutOfFlowContext( | 156 ALWAYS_INLINE static void updateOutOfFlowContext( |
| 160 const LayoutObject&, | 157 const LayoutObject&, |
| 161 PaintPropertyTreeBuilderContext&); | 158 PaintPropertyTreeBuilderContext&); |
| 162 }; | 159 }; |
| 163 | 160 |
| 164 } // namespace blink | 161 } // namespace blink |
| 165 | 162 |
| 166 #endif // PaintPropertyTreeBuilder_h | 163 #endif // PaintPropertyTreeBuilder_h |
| OLD | NEW |