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_MICRO_BENCHMARK_CONTROLLER_H_ | 5 #ifndef CC_DEBUG_MICRO_BENCHMARK_CONTROLLER_H_ |
6 #define CC_DEBUG_MICRO_BENCHMARK_CONTROLLER_H_ | 6 #define CC_DEBUG_MICRO_BENCHMARK_CONTROLLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
| 9 #include <vector> |
9 | 10 |
10 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
11 #include "base/callback.h" | 12 #include "base/callback.h" |
12 #include "cc/base/scoped_ptr_vector.h" | |
13 #include "cc/debug/micro_benchmark.h" | 13 #include "cc/debug/micro_benchmark.h" |
14 | 14 |
15 namespace base { | 15 namespace base { |
16 class SingleThreadTaskRunner; | 16 class SingleThreadTaskRunner; |
17 class Value; | 17 class Value; |
18 } // namespace base | 18 } // namespace base |
19 | 19 |
20 namespace cc { | 20 namespace cc { |
21 | 21 |
22 class LayerTreeHost; | 22 class LayerTreeHost; |
(...skipping 12 matching lines...) Expand all Loading... |
35 // Returns true if the message was successfully delivered and handled. | 35 // Returns true if the message was successfully delivered and handled. |
36 bool SendMessage(int id, scoped_ptr<base::Value> value); | 36 bool SendMessage(int id, scoped_ptr<base::Value> value); |
37 | 37 |
38 void ScheduleImplBenchmarks(LayerTreeHostImpl* host_impl); | 38 void ScheduleImplBenchmarks(LayerTreeHostImpl* host_impl); |
39 | 39 |
40 private: | 40 private: |
41 void CleanUpFinishedBenchmarks(); | 41 void CleanUpFinishedBenchmarks(); |
42 int GetNextIdAndIncrement(); | 42 int GetNextIdAndIncrement(); |
43 | 43 |
44 LayerTreeHost* host_; | 44 LayerTreeHost* host_; |
45 ScopedPtrVector<MicroBenchmark> benchmarks_; | 45 std::vector<scoped_ptr<MicroBenchmark>> benchmarks_; |
46 static int next_id_; | 46 static int next_id_; |
47 scoped_refptr<base::SingleThreadTaskRunner> main_controller_task_runner_; | 47 scoped_refptr<base::SingleThreadTaskRunner> main_controller_task_runner_; |
48 | 48 |
49 DISALLOW_COPY_AND_ASSIGN(MicroBenchmarkController); | 49 DISALLOW_COPY_AND_ASSIGN(MicroBenchmarkController); |
50 }; | 50 }; |
51 | 51 |
52 } // namespace cc | 52 } // namespace cc |
53 | 53 |
54 #endif // CC_DEBUG_MICRO_BENCHMARK_CONTROLLER_H_ | 54 #endif // CC_DEBUG_MICRO_BENCHMARK_CONTROLLER_H_ |
OLD | NEW |