OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_INVALIDATION_BENCHMARK_H_ | 5 #ifndef CC_DEBUG_INVALIDATION_BENCHMARK_H_ |
6 #define CC_DEBUG_INVALIDATION_BENCHMARK_H_ | 6 #define CC_DEBUG_INVALIDATION_BENCHMARK_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "cc/debug/micro_benchmark_controller.h" | 10 #include "cc/debug/micro_benchmark_controller.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 ~InvalidationBenchmark() override; | 24 ~InvalidationBenchmark() override; |
25 | 25 |
26 // Implements MicroBenchmark interface. | 26 // Implements MicroBenchmark interface. |
27 void DidUpdateLayers(LayerTreeHost* host) override; | 27 void DidUpdateLayers(LayerTreeHost* host) override; |
28 void RunOnLayer(PictureLayer* layer) override; | 28 void RunOnLayer(PictureLayer* layer) override; |
29 bool ProcessMessage(scoped_ptr<base::Value> value) override; | 29 bool ProcessMessage(scoped_ptr<base::Value> value) override; |
30 | 30 |
31 private: | 31 private: |
32 enum Mode { FIXED_SIZE, LAYER, VIEWPORT, RANDOM }; | 32 enum Mode { FIXED_SIZE, LAYER, VIEWPORT, RANDOM }; |
33 | 33 |
34 void Run(Layer* layer); | |
35 float LCGRandom(); | 34 float LCGRandom(); |
36 | 35 |
37 Mode mode_; | 36 Mode mode_; |
38 int width_; | 37 int width_; |
39 int height_; | 38 int height_; |
40 uint32 seed_; | 39 uint32 seed_; |
41 }; | 40 }; |
42 | 41 |
43 } // namespace cc | 42 } // namespace cc |
44 | 43 |
45 #endif // CC_DEBUG_INVALIDATION_BENCHMARK_H_ | 44 #endif // CC_DEBUG_INVALIDATION_BENCHMARK_H_ |
OLD | NEW |