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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
11 #include <utility> | 11 #include <utility> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
15 #include "base/single_thread_task_runner.h" | 15 #include "base/single_thread_task_runner.h" |
16 #include "base/time/time.h" | 16 #include "base/time/time.h" |
17 #include "cc/debug/micro_benchmark_controller.h" | 17 #include "cc/debug/micro_benchmark_controller.h" |
18 #include "cc/playback/recording_source.h" | 18 #include "cc/playback/recording_source.h" |
19 | 19 |
20 namespace base { | 20 namespace base { |
21 class DictionaryValue; | 21 class DictionaryValue; |
22 } | 22 } |
23 | 23 |
24 namespace cc { | 24 namespace cc { |
25 | 25 |
26 class LayerTree; | 26 class LayerTree; |
27 class Layer; | |
28 | 27 |
29 class RasterizeAndRecordBenchmark : public MicroBenchmark { | 28 class RasterizeAndRecordBenchmark : public MicroBenchmark { |
30 public: | 29 public: |
31 explicit RasterizeAndRecordBenchmark( | 30 explicit RasterizeAndRecordBenchmark( |
32 std::unique_ptr<base::Value> value, | 31 std::unique_ptr<base::Value> value, |
33 const MicroBenchmark::DoneCallback& callback); | 32 const MicroBenchmark::DoneCallback& callback); |
34 ~RasterizeAndRecordBenchmark() override; | 33 ~RasterizeAndRecordBenchmark() override; |
35 | 34 |
36 // Implements MicroBenchmark interface. | 35 // Implements MicroBenchmark interface. |
37 void DidUpdateLayers(LayerTree* layer_tree) override; | 36 void DidUpdateLayers(LayerTree* layer_tree) override; |
(...skipping 23 matching lines...) Expand all Loading... |
61 bool main_thread_benchmark_done_; | 60 bool main_thread_benchmark_done_; |
62 | 61 |
63 LayerTree* layer_tree_; | 62 LayerTree* layer_tree_; |
64 | 63 |
65 base::WeakPtrFactory<RasterizeAndRecordBenchmark> weak_ptr_factory_; | 64 base::WeakPtrFactory<RasterizeAndRecordBenchmark> weak_ptr_factory_; |
66 }; | 65 }; |
67 | 66 |
68 } // namespace cc | 67 } // namespace cc |
69 | 68 |
70 #endif // CC_DEBUG_RASTERIZE_AND_RECORD_BENCHMARK_H_ | 69 #endif // CC_DEBUG_RASTERIZE_AND_RECORD_BENCHMARK_H_ |
OLD | NEW |