Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1245)

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.h

Issue 2886133003: Only call paint property-requiring subroutines if there are actually properties. (Closed)
Patch Set: Merge branch 'master' into paintpropertiesoptimized Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 #include "platform/graphics/paint/ScrollPaintPropertyNode.h" 11 #include "platform/graphics/paint/ScrollPaintPropertyNode.h"
12 #include "platform/graphics/paint/TransformPaintPropertyNode.h" 12 #include "platform/graphics/paint/TransformPaintPropertyNode.h"
13 #include "platform/wtf/RefPtr.h" 13 #include "platform/wtf/RefPtr.h"
14 14
15 namespace blink { 15 namespace blink {
16 16
17 class FrameView; 17 class FrameView;
18 class LayoutBoxModelObject; 18 class LayoutBoxModelObject;
19 class LayoutObject; 19 class LayoutObject;
20 class ObjectPaintProperties;
20 21
21 // The context for PaintPropertyTreeBuilder. 22 // The context for PaintPropertyTreeBuilder.
22 // It's responsible for bookkeeping tree state in other order, for example, the 23 // It's responsible for bookkeeping tree state in other order, for example, the
23 // most recent position container seen. 24 // most recent position container seen.
24 struct PaintPropertyTreeBuilderFragmentContext { 25 struct PaintPropertyTreeBuilderFragmentContext {
25 USING_FAST_MALLOC(PaintPropertyTreeBuilderFragmentContext); 26 USING_FAST_MALLOC(PaintPropertyTreeBuilderFragmentContext);
26 27
27 public: 28 public:
28 // Initializes all property tree nodes to the roots. 29 // Initializes all property tree nodes to the roots.
29 PaintPropertyTreeBuilderFragmentContext(); 30 PaintPropertyTreeBuilderFragmentContext();
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 PaintPropertyTreeBuilderFragmentContext&, 149 PaintPropertyTreeBuilderFragmentContext&,
149 bool& force_subtree_update); 150 bool& force_subtree_update);
150 ALWAYS_INLINE static void UpdateForObjectLocationAndSize( 151 ALWAYS_INLINE static void UpdateForObjectLocationAndSize(
151 const LayoutObject&, 152 const LayoutObject&,
152 const LayoutObject* container_for_absolute_position, 153 const LayoutObject* container_for_absolute_position,
153 bool& is_actually_needed, 154 bool& is_actually_needed,
154 PaintPropertyTreeBuilderFragmentContext&, 155 PaintPropertyTreeBuilderFragmentContext&,
155 bool& force_subtree_update); 156 bool& force_subtree_update);
156 ALWAYS_INLINE static void UpdateTransform( 157 ALWAYS_INLINE static void UpdateTransform(
157 const LayoutObject&, 158 const LayoutObject&,
159 ObjectPaintProperties&,
158 PaintPropertyTreeBuilderFragmentContext&, 160 PaintPropertyTreeBuilderFragmentContext&,
159 bool& force_subtree_update); 161 bool& force_subtree_update);
160 ALWAYS_INLINE static void UpdateTransformForNonRootSVG( 162 ALWAYS_INLINE static void UpdateTransformForNonRootSVG(
161 const LayoutObject&, 163 const LayoutObject&,
164 ObjectPaintProperties&,
162 PaintPropertyTreeBuilderFragmentContext&, 165 PaintPropertyTreeBuilderFragmentContext&,
163 bool& force_subtree_update); 166 bool& force_subtree_update);
164 ALWAYS_INLINE static void UpdateEffect( 167 ALWAYS_INLINE static void UpdateEffect(
165 const LayoutObject&, 168 const LayoutObject&,
169 ObjectPaintProperties&,
166 PaintPropertyTreeBuilderFragmentContext&, 170 PaintPropertyTreeBuilderFragmentContext&,
167 bool& force_subtree_update); 171 bool& force_subtree_update);
168 ALWAYS_INLINE static void UpdateFilter( 172 ALWAYS_INLINE static void UpdateFilter(
169 const LayoutObject&, 173 const LayoutObject&,
174 ObjectPaintProperties&,
170 PaintPropertyTreeBuilderFragmentContext&, 175 PaintPropertyTreeBuilderFragmentContext&,
171 bool& force_subtree_update); 176 bool& force_subtree_update);
172 ALWAYS_INLINE static void UpdateCssClip( 177 ALWAYS_INLINE static void UpdateCssClip(
173 const LayoutObject&, 178 const LayoutObject&,
179 ObjectPaintProperties&,
174 PaintPropertyTreeBuilderFragmentContext&, 180 PaintPropertyTreeBuilderFragmentContext&,
175 bool& force_subtree_update); 181 bool& force_subtree_update);
176 ALWAYS_INLINE static void UpdateLocalBorderBoxContext( 182 ALWAYS_INLINE static void UpdateLocalBorderBoxContext(
177 const LayoutObject&, 183 const LayoutObject&,
178 PaintPropertyTreeBuilderFragmentContext&, 184 PaintPropertyTreeBuilderFragmentContext&,
179 bool& force_subtree_update); 185 bool& force_subtree_update);
180 ALWAYS_INLINE static void UpdateScrollbarPaintOffset( 186 ALWAYS_INLINE static void UpdateScrollbarPaintOffset(
181 const LayoutObject&, 187 const LayoutObject&,
188 ObjectPaintProperties&,
182 PaintPropertyTreeBuilderFragmentContext&, 189 PaintPropertyTreeBuilderFragmentContext&,
183 bool& force_subtree_update); 190 bool& force_subtree_update);
184 ALWAYS_INLINE static void UpdateOverflowClip( 191 ALWAYS_INLINE static void UpdateOverflowClip(
185 const LayoutObject&, 192 const LayoutObject&,
193 ObjectPaintProperties&,
186 PaintPropertyTreeBuilderFragmentContext&, 194 PaintPropertyTreeBuilderFragmentContext&,
187 bool& force_subtree_update); 195 bool& force_subtree_update);
188 ALWAYS_INLINE static void UpdatePerspective( 196 ALWAYS_INLINE static void UpdatePerspective(
189 const LayoutObject&, 197 const LayoutObject&,
198 ObjectPaintProperties&,
190 PaintPropertyTreeBuilderFragmentContext&, 199 PaintPropertyTreeBuilderFragmentContext&,
191 bool& force_subtree_update); 200 bool& force_subtree_update);
192 ALWAYS_INLINE static void UpdateSvgLocalToBorderBoxTransform( 201 ALWAYS_INLINE static void UpdateSvgLocalToBorderBoxTransform(
193 const LayoutObject&, 202 const LayoutObject&,
203 ObjectPaintProperties&,
194 PaintPropertyTreeBuilderFragmentContext&, 204 PaintPropertyTreeBuilderFragmentContext&,
195 bool& force_subtree_update); 205 bool& force_subtree_update);
196 ALWAYS_INLINE static void UpdateScrollAndScrollTranslation( 206 ALWAYS_INLINE static void UpdateScrollAndScrollTranslation(
197 const LayoutObject&, 207 const LayoutObject&,
208 ObjectPaintProperties&,
198 PaintPropertyTreeBuilderFragmentContext&, 209 PaintPropertyTreeBuilderFragmentContext&,
199 bool& force_subtree_update); 210 bool& force_subtree_update);
200 ALWAYS_INLINE static void UpdateOutOfFlowContext( 211 ALWAYS_INLINE static void UpdateOutOfFlowContext(
201 const LayoutObject&, 212 const LayoutObject&,
202 PaintPropertyTreeBuilderFragmentContext&, 213 PaintPropertyTreeBuilderFragmentContext&,
203 bool& force_subtree_update); 214 bool& force_subtree_update);
204 215
205 // Ensure the ObjectPaintProperties object is created if it will be needed, or 216 // Ensure the ObjectPaintProperties object is created if it will be needed, or
206 // cleared otherwise. 217 // cleared otherwise.
207 ALWAYS_INLINE static void UpdatePaintProperties( 218 ALWAYS_INLINE static void UpdatePaintProperties(
208 const LayoutObject&, 219 const LayoutObject&,
209 PaintPropertyTreeBuilderContext&); 220 PaintPropertyTreeBuilderContext&);
210 }; 221 };
211 222
212 } // namespace blink 223 } // namespace blink
213 224
214 #endif // PaintPropertyTreeBuilder_h 225 #endif // PaintPropertyTreeBuilder_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698