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

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

Issue 2748443002: Do not commit: Object paint property statistics (Closed)
Patch Set: Fix bug in contentsProperties Created 3 years, 9 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"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class FrameView; 14 class FrameView;
15 class GeometryMapper; 15 class GeometryMapper;
16 class LayoutObject; 16 class LayoutObject;
17 struct PrePaintTreeWalkContext; 17 struct PrePaintTreeWalkContext;
18 18
19 struct TreeStats;
20
19 // This class walks the whole layout tree, beginning from the root FrameView, 21 // This class walks the whole layout tree, beginning from the root FrameView,
20 // across frame boundaries. Helper classes are called for each tree node to 22 // across frame boundaries. Helper classes are called for each tree node to
21 // perform actual actions. It expects to be invoked in InPrePaint phase. 23 // perform actual actions. It expects to be invoked in InPrePaint phase.
22 class PrePaintTreeWalk { 24 class PrePaintTreeWalk {
23 public: 25 public:
24 PrePaintTreeWalk(GeometryMapper& geometryMapper) 26 PrePaintTreeWalk(GeometryMapper& geometryMapper)
25 : m_paintInvalidator(geometryMapper), m_geometryMapper(geometryMapper) {} 27 : m_paintInvalidator(geometryMapper), m_geometryMapper(geometryMapper) {}
26 void walk(FrameView& rootFrame); 28 void walk(FrameView& rootFrame);
27 29
30 void printStats(const FrameView& rootFrame);
31 void countStats(TreeStats&, const FrameView&);
32 void countStats(TreeStats&, const LayoutObject&);
33
28 private: 34 private:
29 void walk(FrameView&, const PrePaintTreeWalkContext&); 35 void walk(FrameView&, const PrePaintTreeWalkContext&);
30 void walk(const LayoutObject&, const PrePaintTreeWalkContext&); 36 void walk(const LayoutObject&, const PrePaintTreeWalkContext&);
31 37
32 // Invalidates paint-layer painting optimizations, such as subsequence caching 38 // Invalidates paint-layer painting optimizations, such as subsequence caching
33 // and empty paint phase optimizations if clips from the context have changed. 39 // and empty paint phase optimizations if clips from the context have changed.
34 void invalidatePaintLayerOptimizationsIfNeeded(const LayoutObject&, 40 void invalidatePaintLayerOptimizationsIfNeeded(const LayoutObject&,
35 PrePaintTreeWalkContext&); 41 PrePaintTreeWalkContext&);
36 42
37 // Returns in |clipRect| the clip applied to children for the given 43 // Returns in |clipRect| the clip applied to children for the given
(...skipping 11 matching lines...) Expand all
49 bool shouldEndWalkBefore(const LayoutObject&, const PrePaintTreeWalkContext&); 55 bool shouldEndWalkBefore(const LayoutObject&, const PrePaintTreeWalkContext&);
50 56
51 PaintPropertyTreeBuilder m_propertyTreeBuilder; 57 PaintPropertyTreeBuilder m_propertyTreeBuilder;
52 PaintInvalidator m_paintInvalidator; 58 PaintInvalidator m_paintInvalidator;
53 GeometryMapper& m_geometryMapper; 59 GeometryMapper& m_geometryMapper;
54 }; 60 };
55 61
56 } // namespace blink 62 } // namespace blink
57 63
58 #endif // PrePaintTreeWalk_h 64 #endif // PrePaintTreeWalk_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698