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 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "cc/base/scoped_ptr_vector.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 Value; | 16 class Value; |
| 17 class MessageLoopProxy; |
17 } // namespace base | 18 } // namespace base |
18 | 19 |
19 namespace cc { | 20 namespace cc { |
20 | 21 |
21 class LayerTreeHost; | 22 class LayerTreeHost; |
22 class Layer; | 23 class LayerTreeHostImpl; |
23 class PictureLayer; | |
24 class MicroBenchmarkController { | 24 class MicroBenchmarkController { |
25 public: | 25 public: |
26 explicit MicroBenchmarkController(LayerTreeHost* host); | 26 explicit MicroBenchmarkController(LayerTreeHost* host); |
27 ~MicroBenchmarkController(); | 27 ~MicroBenchmarkController(); |
28 | 28 |
29 void DidUpdateLayers(); | 29 void DidUpdateLayers(); |
30 | 30 |
31 bool ScheduleRun(const std::string& micro_benchmark_name, | 31 bool ScheduleRun(const std::string& micro_benchmark_name, |
32 scoped_ptr<base::Value> value, | 32 scoped_ptr<base::Value> value, |
33 const MicroBenchmark::DoneCallback& callback); | 33 const MicroBenchmark::DoneCallback& callback); |
34 | 34 |
| 35 void ScheduleImplBenchmarks(LayerTreeHostImpl* host_impl); |
| 36 |
35 private: | 37 private: |
36 void CleanUpFinishedBenchmarks(); | 38 void CleanUpFinishedBenchmarks(); |
37 | 39 |
38 LayerTreeHost* host_; | 40 LayerTreeHost* host_; |
39 ScopedPtrVector<MicroBenchmark> benchmarks_; | 41 ScopedPtrVector<MicroBenchmark> benchmarks_; |
| 42 scoped_refptr<base::MessageLoopProxy> main_controller_message_loop_; |
40 | 43 |
41 DISALLOW_COPY_AND_ASSIGN(MicroBenchmarkController); | 44 DISALLOW_COPY_AND_ASSIGN(MicroBenchmarkController); |
42 }; | 45 }; |
43 | 46 |
44 } // namespace cc | 47 } // namespace cc |
45 | 48 |
46 #endif // CC_DEBUG_MICRO_BENCHMARK_CONTROLLER_H_ | 49 #endif // CC_DEBUG_MICRO_BENCHMARK_CONTROLLER_H_ |
OLD | NEW |