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 LayoutAnalyzer_h | 5 #ifndef LayoutAnalyzer_h |
6 #define LayoutAnalyzer_h | 6 #define LayoutAnalyzer_h |
7 | 7 |
8 #include "wtf/PassRefPtr.h" | 8 #include "wtf/PassRefPtr.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 54 |
55 void reset(); | 55 void reset(); |
56 void push(const LayoutObject&); | 56 void push(const LayoutObject&); |
57 void pop(const LayoutObject&); | 57 void pop(const LayoutObject&); |
58 | 58 |
59 void increment(Counter counter, unsigned delta = 1) | 59 void increment(Counter counter, unsigned delta = 1) |
60 { | 60 { |
61 m_counters[counter] += delta; | 61 m_counters[counter] += delta; |
62 } | 62 } |
63 | 63 |
64 void recordCounters(); | |
65 | |
66 PassRefPtr<TracedValue> toTracedValue(); | 64 PassRefPtr<TracedValue> toTracedValue(); |
67 | 65 |
68 private: | 66 private: |
69 const char* nameForCounter(Counter) const; | 67 const char* nameForCounter(Counter) const; |
70 | 68 |
71 double m_startMs; | 69 double m_startMs; |
72 unsigned m_depth; | 70 unsigned m_depth; |
73 unsigned m_counters[NumCounters]; | 71 unsigned m_counters[NumCounters]; |
74 }; | 72 }; |
75 | 73 |
76 } // namespace blink | 74 } // namespace blink |
77 | 75 |
78 #endif // LayoutAnalyzer_h | 76 #endif // LayoutAnalyzer_h |
OLD | NEW |