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_RASTERIZE_AND_RECORD_BENCHMARK_H_ | 5 #ifndef CC_DEBUG_RASTERIZE_AND_RECORD_BENCHMARK_H_ |
6 #define CC_DEBUG_RASTERIZE_AND_RECORD_BENCHMARK_H_ | 6 #define CC_DEBUG_RASTERIZE_AND_RECORD_BENCHMARK_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
14 #include "cc/debug/micro_benchmark_controller.h" | 14 #include "cc/debug/micro_benchmark_controller.h" |
15 #include "cc/resources/picture.h" | 15 #include "cc/resources/picture.h" |
16 | 16 |
17 namespace base { | 17 namespace base { |
18 class DictionaryValue; | 18 class DictionaryValue; |
19 } | 19 } |
20 | 20 |
21 namespace cc { | 21 namespace cc { |
22 | 22 |
23 class LayerTreeHost; | 23 class LayerTreeHost; |
24 class Layer; | 24 class Layer; |
25 class RasterizeAndRecordBenchmark : public MicroBenchmark { | 25 class RasterizeAndRecordBenchmark : public MicroBenchmark { |
26 public: | 26 public: |
27 explicit RasterizeAndRecordBenchmark( | 27 explicit RasterizeAndRecordBenchmark( |
28 scoped_ptr<base::Value> value, | 28 scoped_ptr<base::Value> value, |
29 const MicroBenchmark::DoneCallback& callback); | 29 const MicroBenchmark::DoneCallback& callback, |
| 30 int id); |
30 virtual ~RasterizeAndRecordBenchmark(); | 31 virtual ~RasterizeAndRecordBenchmark(); |
31 | 32 |
32 // Implements MicroBenchmark interface. | 33 // Implements MicroBenchmark interface. |
33 virtual void DidUpdateLayers(LayerTreeHost* host) OVERRIDE; | 34 virtual void DidUpdateLayers(LayerTreeHost* host) OVERRIDE; |
34 virtual void RunOnLayer(PictureLayer* layer) OVERRIDE; | 35 virtual void RunOnLayer(PictureLayer* layer) OVERRIDE; |
35 | 36 |
36 virtual scoped_ptr<MicroBenchmarkImpl> CreateBenchmarkImpl( | 37 virtual scoped_ptr<MicroBenchmarkImpl> CreateBenchmarkImpl( |
37 scoped_refptr<base::MessageLoopProxy> origin_loop) OVERRIDE; | 38 scoped_refptr<base::MessageLoopProxy> origin_loop) OVERRIDE; |
38 | 39 |
39 private: | 40 private: |
(...skipping 18 matching lines...) Expand all Loading... |
58 bool main_thread_benchmark_done_; | 59 bool main_thread_benchmark_done_; |
59 | 60 |
60 LayerTreeHost* host_; | 61 LayerTreeHost* host_; |
61 | 62 |
62 base::WeakPtrFactory<RasterizeAndRecordBenchmark> weak_ptr_factory_; | 63 base::WeakPtrFactory<RasterizeAndRecordBenchmark> weak_ptr_factory_; |
63 }; | 64 }; |
64 | 65 |
65 } // namespace cc | 66 } // namespace cc |
66 | 67 |
67 #endif // CC_DEBUG_RASTERIZE_AND_RECORD_BENCHMARK_H_ | 68 #endif // CC_DEBUG_RASTERIZE_AND_RECORD_BENCHMARK_H_ |
OLD | NEW |