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