| 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 #include "ui/gfx/geometry/rect.h" | |
| 20 | 19 |
| 21 namespace base { | 20 namespace base { |
| 22 class DictionaryValue; | 21 class DictionaryValue; |
| 23 } | 22 } |
| 24 | 23 |
| 25 namespace cc { | 24 namespace cc { |
| 26 | 25 |
| 27 class LayerTreeHost; | 26 class LayerTreeHost; |
| 28 class Layer; | 27 class Layer; |
| 28 |
| 29 class RasterizeAndRecordBenchmark : public MicroBenchmark { | 29 class RasterizeAndRecordBenchmark : public MicroBenchmark { |
| 30 public: | 30 public: |
| 31 explicit RasterizeAndRecordBenchmark( | 31 explicit RasterizeAndRecordBenchmark( |
| 32 std::unique_ptr<base::Value> value, | 32 std::unique_ptr<base::Value> value, |
| 33 const MicroBenchmark::DoneCallback& callback); | 33 const MicroBenchmark::DoneCallback& callback); |
| 34 ~RasterizeAndRecordBenchmark() override; | 34 ~RasterizeAndRecordBenchmark() override; |
| 35 | 35 |
| 36 // Implements MicroBenchmark interface. | 36 // Implements MicroBenchmark interface. |
| 37 void DidUpdateLayers(LayerTreeHost* host) override; | 37 void DidUpdateLayers(LayerTreeHost* host) override; |
| 38 void RunOnLayer(PictureLayer* layer) override; | 38 void RunOnLayer(PictureLayer* layer) override; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 61 bool main_thread_benchmark_done_; | 61 bool main_thread_benchmark_done_; |
| 62 | 62 |
| 63 LayerTreeHost* host_; | 63 LayerTreeHost* host_; |
| 64 | 64 |
| 65 base::WeakPtrFactory<RasterizeAndRecordBenchmark> weak_ptr_factory_; | 65 base::WeakPtrFactory<RasterizeAndRecordBenchmark> weak_ptr_factory_; |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 } // namespace cc | 68 } // namespace cc |
| 69 | 69 |
| 70 #endif // CC_DEBUG_RASTERIZE_AND_RECORD_BENCHMARK_H_ | 70 #endif // CC_DEBUG_RASTERIZE_AND_RECORD_BENCHMARK_H_ |
| OLD | NEW |