OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CC_DEBUG_RENDERING_STATS_INSTRUMENTATION_H_ | 5 #ifndef CC_DEBUG_RENDERING_STATS_INSTRUMENTATION_H_ |
6 #define CC_DEBUG_RENDERING_STATS_INSTRUMENTATION_H_ | 6 #define CC_DEBUG_RENDERING_STATS_INSTRUMENTATION_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
10 #include "cc/debug/rendering_stats.h" | 10 #include "cc/debug/rendering_stats.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 void AddRecord(base::TimeDelta duration, int64 pixels); | 52 void AddRecord(base::TimeDelta duration, int64 pixels); |
53 void AddRaster(base::TimeDelta duration, int64 pixels); | 53 void AddRaster(base::TimeDelta duration, int64 pixels); |
54 void AddAnalysis(base::TimeDelta duration, int64 pixels); | 54 void AddAnalysis(base::TimeDelta duration, int64 pixels); |
55 void AddVisibleContentArea(int64 area); | 55 void AddVisibleContentArea(int64 area); |
56 void AddApproximatedVisibleContentArea(int64 area); | 56 void AddApproximatedVisibleContentArea(int64 area); |
57 | 57 |
58 protected: | 58 protected: |
59 RenderingStatsInstrumentation(); | 59 RenderingStatsInstrumentation(); |
60 | 60 |
61 private: | 61 private: |
62 // TODO(ernstm): rename to *_thread_rendering_stats_* | 62 MainThreadRenderingStats main_thread_rendering_stats_; |
63 MainThreadRenderingStats main_stats_; | 63 MainThreadRenderingStats main_thread_rendering_stats_accu_; |
64 MainThreadRenderingStats main_stats_accu_; | 64 ImplThreadRenderingStats impl_thread_rendering_stats_; |
65 ImplThreadRenderingStats impl_stats_; | 65 ImplThreadRenderingStats impl_thread_rendering_stats_accu_; |
66 ImplThreadRenderingStats impl_stats_accu_; | |
67 | 66 |
68 bool record_rendering_stats_; | 67 bool record_rendering_stats_; |
69 | 68 |
70 base::Lock lock_; | 69 base::Lock lock_; |
71 | 70 |
72 DISALLOW_COPY_AND_ASSIGN(RenderingStatsInstrumentation); | 71 DISALLOW_COPY_AND_ASSIGN(RenderingStatsInstrumentation); |
73 }; | 72 }; |
74 | 73 |
75 } // namespace cc | 74 } // namespace cc |
76 | 75 |
77 #endif // CC_DEBUG_RENDERING_STATS_INSTRUMENTATION_H_ | 76 #endif // CC_DEBUG_RENDERING_STATS_INSTRUMENTATION_H_ |
OLD | NEW |