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_IMPL_H_ | 5 #ifndef CC_DEBUG_RASTERIZE_AND_RECORD_BENCHMARK_IMPL_H_ |
6 #define CC_DEBUG_RASTERIZE_AND_RECORD_BENCHMARK_IMPL_H_ | 6 #define CC_DEBUG_RASTERIZE_AND_RECORD_BENCHMARK_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 13 matching lines...) Expand all Loading... |
24 scoped_refptr<base::MessageLoopProxy> origin_loop, | 24 scoped_refptr<base::MessageLoopProxy> origin_loop, |
25 base::Value* value, | 25 base::Value* value, |
26 const MicroBenchmarkImpl::DoneCallback& callback); | 26 const MicroBenchmarkImpl::DoneCallback& callback); |
27 ~RasterizeAndRecordBenchmarkImpl() override; | 27 ~RasterizeAndRecordBenchmarkImpl() override; |
28 | 28 |
29 // Implements MicroBenchmark interface. | 29 // Implements MicroBenchmark interface. |
30 void DidCompleteCommit(LayerTreeHostImpl* host) override; | 30 void DidCompleteCommit(LayerTreeHostImpl* host) override; |
31 void RunOnLayer(PictureLayerImpl* layer) override; | 31 void RunOnLayer(PictureLayerImpl* layer) override; |
32 | 32 |
33 private: | 33 private: |
34 void Run(LayerImpl* layer); | |
35 | |
36 struct RasterizeResults { | 34 struct RasterizeResults { |
37 RasterizeResults(); | 35 RasterizeResults(); |
38 ~RasterizeResults(); | 36 ~RasterizeResults(); |
39 | 37 |
40 int pixels_rasterized; | 38 int pixels_rasterized; |
41 int pixels_rasterized_with_non_solid_color; | 39 int pixels_rasterized_with_non_solid_color; |
42 int pixels_rasterized_as_opaque; | 40 int pixels_rasterized_as_opaque; |
43 base::TimeDelta total_best_time; | 41 base::TimeDelta total_best_time; |
44 int total_memory_usage; | 42 int total_memory_usage; |
45 int total_layers; | 43 int total_layers; |
46 int total_picture_layers; | 44 int total_picture_layers; |
47 int total_picture_layers_with_no_content; | 45 int total_picture_layers_with_no_content; |
48 int total_picture_layers_off_screen; | 46 int total_picture_layers_off_screen; |
49 }; | 47 }; |
50 | 48 |
51 RasterizeResults rasterize_results_; | 49 RasterizeResults rasterize_results_; |
52 int rasterize_repeat_count_; | 50 int rasterize_repeat_count_; |
53 }; | 51 }; |
54 | 52 |
55 } // namespace cc | 53 } // namespace cc |
56 | 54 |
57 #endif // CC_DEBUG_RASTERIZE_AND_RECORD_BENCHMARK_IMPL_H_ | 55 #endif // CC_DEBUG_RASTERIZE_AND_RECORD_BENCHMARK_IMPL_H_ |
OLD | NEW |