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" |
| 6 |
5 #include <stdint.h> | 7 #include <stdint.h> |
6 | 8 |
7 #include "cc/debug/rendering_stats_instrumentation.h" | 9 #include "base/memory/ptr_util.h" |
8 | 10 |
9 namespace cc { | 11 namespace cc { |
10 | 12 |
11 // static | 13 // static |
12 scoped_ptr<RenderingStatsInstrumentation> | 14 std::unique_ptr<RenderingStatsInstrumentation> |
13 RenderingStatsInstrumentation::Create() { | 15 RenderingStatsInstrumentation::Create() { |
14 return make_scoped_ptr(new RenderingStatsInstrumentation()); | 16 return base::WrapUnique(new RenderingStatsInstrumentation()); |
15 } | 17 } |
16 | 18 |
17 RenderingStatsInstrumentation::RenderingStatsInstrumentation() | 19 RenderingStatsInstrumentation::RenderingStatsInstrumentation() |
18 : record_rendering_stats_(false) { | 20 : record_rendering_stats_(false) { |
19 } | 21 } |
20 | 22 |
21 RenderingStatsInstrumentation::~RenderingStatsInstrumentation() {} | 23 RenderingStatsInstrumentation::~RenderingStatsInstrumentation() {} |
22 | 24 |
23 RenderingStats RenderingStatsInstrumentation::impl_thread_rendering_stats() { | 25 RenderingStats RenderingStatsInstrumentation::impl_thread_rendering_stats() { |
24 base::AutoLock scoped_lock(lock_); | 26 base::AutoLock scoped_lock(lock_); |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 return; | 125 return; |
124 | 126 |
125 base::AutoLock scoped_lock(lock_); | 127 base::AutoLock scoped_lock(lock_); |
126 impl_thread_rendering_stats_.commit_to_activate_duration.Append( | 128 impl_thread_rendering_stats_.commit_to_activate_duration.Append( |
127 commit_to_activate_duration); | 129 commit_to_activate_duration); |
128 impl_thread_rendering_stats_.commit_to_activate_duration_estimate.Append( | 130 impl_thread_rendering_stats_.commit_to_activate_duration_estimate.Append( |
129 commit_to_activate_duration_estimate); | 131 commit_to_activate_duration_estimate); |
130 } | 132 } |
131 | 133 |
132 } // namespace cc | 134 } // namespace cc |
OLD | NEW |