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 #include "cc/debug/rendering_stats_instrumentation.h" | 5 #include "cc/debug/rendering_stats_instrumentation.h" |
6 | 6 |
7 namespace cc { | 7 namespace cc { |
8 | 8 |
9 // static | 9 // static |
10 scoped_ptr<RenderingStatsInstrumentation> | 10 scoped_ptr<RenderingStatsInstrumentation> |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 void RenderingStatsInstrumentation::AddRaster(base::TimeDelta duration, | 92 void RenderingStatsInstrumentation::AddRaster(base::TimeDelta duration, |
93 int64 pixels) { | 93 int64 pixels) { |
94 if (!record_rendering_stats_) | 94 if (!record_rendering_stats_) |
95 return; | 95 return; |
96 | 96 |
97 base::AutoLock scoped_lock(lock_); | 97 base::AutoLock scoped_lock(lock_); |
98 impl_stats_.rasterize_time += duration; | 98 impl_stats_.rasterize_time += duration; |
99 impl_stats_.rasterized_pixel_count += pixels; | 99 impl_stats_.rasterized_pixel_count += pixels; |
100 } | 100 } |
101 | 101 |
102 void RenderingStatsInstrumentation::AddAnalysis(base::TimeDelta duration, | |
103 int64 pixels) { | |
104 if (!record_rendering_stats_) | |
105 return; | |
106 | |
107 base::AutoLock scoped_lock(lock_); | |
108 impl_stats_.analysis_time += duration; | |
109 } | |
110 | |
111 } // namespace cc | 102 } // namespace cc |
OLD | NEW |