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

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

Issue 2791883002: Optimize ClipRects in the PrePaintTreeWalk (Closed)
Patch Set: none Created 3 years, 8 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
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 PrePaintTreeWalk_h 5 #ifndef PrePaintTreeWalk_h
6 #define PrePaintTreeWalk_h 6 #define PrePaintTreeWalk_h
7 7
8 #include "core/paint/ClipRect.h" 8 #include "core/paint/ClipRect.h"
9 #include "core/paint/PaintInvalidator.h" 9 #include "core/paint/PaintInvalidator.h"
10 #include "core/paint/PaintPropertyTreeBuilder.h" 10 #include "core/paint/PaintPropertyTreeBuilder.h"
(...skipping 13 matching lines...) Expand all
24 PrePaintTreeWalk(GeometryMapper& geometryMapper) 24 PrePaintTreeWalk(GeometryMapper& geometryMapper)
25 : m_geometryMapper(geometryMapper) {} 25 : m_geometryMapper(geometryMapper) {}
26 void walk(FrameView& rootFrame); 26 void walk(FrameView& rootFrame);
27 27
28 private: 28 private:
29 void walk(FrameView&, const PrePaintTreeWalkContext&); 29 void walk(FrameView&, const PrePaintTreeWalkContext&);
30 void walk(const LayoutObject&, const PrePaintTreeWalkContext&); 30 void walk(const LayoutObject&, const PrePaintTreeWalkContext&);
31 31
32 // Invalidates paint-layer painting optimizations, such as subsequence caching 32 // Invalidates paint-layer painting optimizations, such as subsequence caching
33 // and empty paint phase optimizations if clips from the context have changed. 33 // and empty paint phase optimizations if clips from the context have changed.
34 void invalidatePaintLayerOptimizationsIfNeeded(const LayoutObject&, 34 ALWAYS_INLINE void invalidatePaintLayerOptimizationsIfNeeded(
35 PrePaintTreeWalkContext&); 35 const LayoutObject&,
36 PrePaintTreeWalkContext&);
36 37
37 // Returns in |clipRect| the clip applied to children for the given 38 // Returns in |clipRect| the clip applied to children for the given
38 // contaiing block context + effect, in the space of ancestorState adjusted 39 // contaiing block context + effect, in the space of ancestorState adjusted
39 // by ancestorPaintOffset. Sets hasClip to true if a clip was applied. 40 // by ancestorPaintOffset. Sets hasClip to true if a clip was applied.
Xianzhu 2017/04/03 16:30:15 Remove the sentence about 'hasClip'.
chrishtr 2017/04/03 16:36:42 Done.
40 void computeClipRectForContext( 41 ALWAYS_INLINE void computeClipRectForContext(
41 const PaintPropertyTreeBuilderContext::ContainingBlockContext&, 42 const PaintPropertyTreeBuilderContext::ContainingBlockContext&,
42 const EffectPaintPropertyNode*, 43 const EffectPaintPropertyNode*,
43 const PropertyTreeState& ancestorState, 44 const PropertyTreeState& ancestorState,
44 const LayoutPoint& ancestorPaintOffset, 45 const LayoutPoint& ancestorPaintOffset,
45 bool& hasClip,
46 FloatClipRect&); 46 FloatClipRect&);
47 47
48 bool ALWAYS_INLINE 48 bool ALWAYS_INLINE
49 needsTreeBuilderContextUpdate(const FrameView&, 49 needsTreeBuilderContextUpdate(const FrameView&,
50 const PrePaintTreeWalkContext&); 50 const PrePaintTreeWalkContext&);
51 bool ALWAYS_INLINE 51 bool ALWAYS_INLINE
52 needsTreeBuilderContextUpdate(const LayoutObject&, 52 needsTreeBuilderContextUpdate(const LayoutObject&,
53 const PrePaintTreeWalkContext&); 53 const PrePaintTreeWalkContext&);
54 54
55 PaintPropertyTreeBuilder m_propertyTreeBuilder; 55 PaintPropertyTreeBuilder m_propertyTreeBuilder;
56 PaintInvalidator m_paintInvalidator; 56 PaintInvalidator m_paintInvalidator;
57 GeometryMapper& m_geometryMapper; 57 GeometryMapper& m_geometryMapper;
58 }; 58 };
59 59
60 } // namespace blink 60 } // namespace blink
61 61
62 #endif // PrePaintTreeWalk_h 62 #endif // PrePaintTreeWalk_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp ('k') | third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698