OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 20 matching lines...) Expand all Loading... |
31 #ifndef StyleResolverStats_h | 31 #ifndef StyleResolverStats_h |
32 #define StyleResolverStats_h | 32 #define StyleResolverStats_h |
33 | 33 |
34 #include "platform/TraceEvent.h" | 34 #include "platform/TraceEvent.h" |
35 #include "platform/TracedValue.h" | 35 #include "platform/TracedValue.h" |
36 #include "wtf/PassOwnPtr.h" | 36 #include "wtf/PassOwnPtr.h" |
37 | 37 |
38 namespace blink { | 38 namespace blink { |
39 | 39 |
40 class StyleResolverStats { | 40 class StyleResolverStats { |
| 41 WTF_MAKE_FAST_ALLOCATED(StyleResolverStats); |
41 public: | 42 public: |
42 static PassOwnPtr<StyleResolverStats> create() | 43 static PassOwnPtr<StyleResolverStats> create() |
43 { | 44 { |
44 return adoptPtr(new StyleResolverStats); | 45 return adoptPtr(new StyleResolverStats); |
45 } | 46 } |
46 | 47 |
47 void reset(); | 48 void reset(); |
48 bool allCountersEnabled() const; | 49 bool allCountersEnabled() const; |
49 PassRefPtr<TracedValue> toTracedValue() const; | 50 PassRefPtr<TracedValue> toTracedValue() const; |
50 | 51 |
(...skipping 23 matching lines...) Expand all Loading... |
74 { | 75 { |
75 reset(); | 76 reset(); |
76 } | 77 } |
77 }; | 78 }; |
78 | 79 |
79 #define INCREMENT_STYLE_STATS_COUNTER(resolver, counter, n) ((resolver).stats()
&& ((resolver).stats()-> counter += n)); | 80 #define INCREMENT_STYLE_STATS_COUNTER(resolver, counter, n) ((resolver).stats()
&& ((resolver).stats()-> counter += n)); |
80 | 81 |
81 } // namespace blink | 82 } // namespace blink |
82 | 83 |
83 #endif // StyleResolverStats_h | 84 #endif // StyleResolverStats_h |
OLD | NEW |