| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 // animation, mask, filter, ... etc. | 93 // animation, mask, filter, ... etc. |
| 94 // It expects to be invoked for each layout tree node in DOM order during | 94 // It expects to be invoked for each layout tree node in DOM order during |
| 95 // InPrePaint phase. | 95 // InPrePaint phase. |
| 96 class PaintPropertyTreeBuilder { | 96 class PaintPropertyTreeBuilder { |
| 97 public: | 97 public: |
| 98 PaintPropertyTreeBuilderContext setupInitialContext(); | 98 PaintPropertyTreeBuilderContext setupInitialContext(); |
| 99 // Update the paint properties for a frame and ensure the context is up to | 99 // Update the paint properties for a frame and ensure the context is up to |
| 100 // date. | 100 // date. |
| 101 void updateProperties(FrameView&, PaintPropertyTreeBuilderContext&); | 101 void updateProperties(FrameView&, PaintPropertyTreeBuilderContext&); |
| 102 | 102 |
| 103 // Update the context to account for positioning. Paint offset and | |
| 104 // paint offset translation (if needed) are updated. If paint offset changes | |
| 105 // we will force subtree update. | |
| 106 void updateContextForBoxPosition(const LayoutObject&, | |
| 107 PaintPropertyTreeBuilderContext&); | |
| 108 | |
| 109 // Update the paint properties that affect this object (e.g., properties like | 103 // Update the paint properties that affect this object (e.g., properties like |
| 110 // paint offset translation) and ensure the context is up to date. Also | 104 // paint offset translation) and ensure the context is up to date. Also |
| 111 // handles updating the object's paintOffset. | 105 // handles updating the object's paintOffset. |
| 112 void updatePropertiesForSelf(const LayoutObject&, | 106 void updatePropertiesForSelf(const LayoutObject&, |
| 113 PaintPropertyTreeBuilderContext&); | 107 PaintPropertyTreeBuilderContext&); |
| 114 // Update the paint properties that affect children of this object (e.g., | 108 // Update the paint properties that affect children of this object (e.g., |
| 115 // scroll offset transform) and ensure the context is up to date. | 109 // scroll offset transform) and ensure the context is up to date. |
| 116 void updatePropertiesForChildren(const LayoutObject&, | 110 void updatePropertiesForChildren(const LayoutObject&, |
| 117 PaintPropertyTreeBuilderContext&); | 111 PaintPropertyTreeBuilderContext&); |
| 118 | 112 |
| 119 private: | 113 private: |
| 120 ALWAYS_INLINE static void updatePaintOffset(const LayoutBoxModelObject&, | 114 ALWAYS_INLINE static void updatePaintOffset(const LayoutBoxModelObject&, |
| 121 PaintPropertyTreeBuilderContext&); | 115 PaintPropertyTreeBuilderContext&); |
| 122 ALWAYS_INLINE static void updatePaintOffsetTranslation( | 116 ALWAYS_INLINE static void updatePaintOffsetTranslation( |
| 123 const LayoutBoxModelObject&, | 117 const LayoutBoxModelObject&, |
| 124 PaintPropertyTreeBuilderContext&); | 118 PaintPropertyTreeBuilderContext&); |
| 119 ALWAYS_INLINE static void updateForObjectLocation( |
| 120 const LayoutObject&, |
| 121 PaintPropertyTreeBuilderContext&); |
| 125 ALWAYS_INLINE static void updateTransform(const LayoutObject&, | 122 ALWAYS_INLINE static void updateTransform(const LayoutObject&, |
| 126 PaintPropertyTreeBuilderContext&); | 123 PaintPropertyTreeBuilderContext&); |
| 127 ALWAYS_INLINE static void updateTransformForNonRootSVG( | 124 ALWAYS_INLINE static void updateTransformForNonRootSVG( |
| 128 const LayoutObject&, | 125 const LayoutObject&, |
| 129 PaintPropertyTreeBuilderContext&); | 126 PaintPropertyTreeBuilderContext&); |
| 130 ALWAYS_INLINE static void updateEffect(const LayoutObject&, | 127 ALWAYS_INLINE static void updateEffect(const LayoutObject&, |
| 131 PaintPropertyTreeBuilderContext&); | 128 PaintPropertyTreeBuilderContext&); |
| 132 ALWAYS_INLINE static void updateCssClip(const LayoutObject&, | 129 ALWAYS_INLINE static void updateCssClip(const LayoutObject&, |
| 133 PaintPropertyTreeBuilderContext&); | 130 PaintPropertyTreeBuilderContext&); |
| 134 ALWAYS_INLINE static void updateLocalBorderBoxContext( | 131 ALWAYS_INLINE static void updateLocalBorderBoxContext( |
| (...skipping 14 matching lines...) Expand all Loading... |
| 149 const LayoutObject&, | 146 const LayoutObject&, |
| 150 PaintPropertyTreeBuilderContext&); | 147 PaintPropertyTreeBuilderContext&); |
| 151 ALWAYS_INLINE static void updateOutOfFlowContext( | 148 ALWAYS_INLINE static void updateOutOfFlowContext( |
| 152 const LayoutObject&, | 149 const LayoutObject&, |
| 153 PaintPropertyTreeBuilderContext&); | 150 PaintPropertyTreeBuilderContext&); |
| 154 }; | 151 }; |
| 155 | 152 |
| 156 } // namespace blink | 153 } // namespace blink |
| 157 | 154 |
| 158 #endif // PaintPropertyTreeBuilder_h | 155 #endif // PaintPropertyTreeBuilder_h |
| OLD | NEW |