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

Side by Side Diff: Source/core/layout/LayoutAnalyzer.h

Issue 1122453002: Revert of Put LayoutAnalyzer back behind disabled-by-default-blink.debug.layout. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 | « Source/core/frame/FrameView.cpp ('k') | Source/core/layout/LayoutAnalyzer.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 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 29 matching lines...) Expand all
40 }; 40 };
41 static const size_t NumCounters = 19; 41 static const size_t NumCounters = 19;
42 42
43 class Scope { 43 class Scope {
44 public: 44 public:
45 explicit Scope(const LayoutObject&); 45 explicit Scope(const LayoutObject&);
46 ~Scope(); 46 ~Scope();
47 47
48 private: 48 private:
49 const LayoutObject& m_layoutObject; 49 const LayoutObject& m_layoutObject;
50 LayoutAnalyzer* m_analyzer; 50 LayoutAnalyzer& m_analyzer;
51 }; 51 };
52 52
53 LayoutAnalyzer() { } 53 LayoutAnalyzer() { }
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(); 64 void recordCounters();
65 65
66 PassRefPtr<TracedValue> toTracedValue(); 66 PassRefPtr<TracedValue> toTracedValue();
67 67
68 private: 68 private:
69 const char* nameForCounter(Counter) const; 69 const char* nameForCounter(Counter) const;
70 70
71 double m_startMs; 71 double m_startMs;
72 unsigned m_depth; 72 unsigned m_depth;
73 unsigned m_counters[NumCounters]; 73 unsigned m_counters[NumCounters];
74 }; 74 };
75 75
76 } // namespace blink 76 } // namespace blink
77 77
78 #endif // LayoutAnalyzer_h 78 #endif // LayoutAnalyzer_h
OLDNEW
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/layout/LayoutAnalyzer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698