OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 * | 6 * |
7 */ | 7 */ |
8 | 8 |
9 #ifndef VisualBenchmarkStream_DEFINED | 9 #ifndef VisualBenchmarkStream_DEFINED |
10 #define VisualBenchmarkStream_DEFINED | 10 #define VisualBenchmarkStream_DEFINED |
11 | 11 |
12 #include "Benchmark.h" | 12 #include "Benchmark.h" |
13 #include "gm.h" | 13 #include "gm.h" |
14 #include "SkCommandLineFlags.h" | 14 #include "SkCommandLineFlags.h" |
15 #include "SkPicture.h" | 15 #include "SkPicture.h" |
16 | 16 |
17 DECLARE_string(match); | 17 DECLARE_string(match); |
18 | 18 |
19 class VisualBenchmarkStream { | 19 class VisualBenchmarkStream { |
20 public: | 20 public: |
21 VisualBenchmarkStream(); | 21 VisualBenchmarkStream(); |
22 | 22 |
23 static bool ReadPicture(const char* path, SkAutoTUnref<SkPicture>* pic); | 23 static bool ReadPicture(const char* path, SkAutoTUnref<SkPicture>* pic); |
24 | 24 |
25 Benchmark* next(); | 25 Benchmark* next(); |
26 | 26 |
27 private: | 27 private: |
| 28 Benchmark* innerNext(); |
| 29 |
28 const BenchRegistry* fBenches; | 30 const BenchRegistry* fBenches; |
29 const skiagm::GMRegistry* fGMs; | 31 const skiagm::GMRegistry* fGMs; |
30 SkTArray<SkString> fSKPs; | 32 SkTArray<SkString> fSKPs; |
31 | 33 |
32 const char* fSourceType; // What we're benching: bench, GM, SKP, ... | 34 const char* fSourceType; // What we're benching: bench, GM, SKP, ... |
33 const char* fBenchType; // How we bench it: micro, playback, ... | 35 const char* fBenchType; // How we bench it: micro, playback, ... |
34 int fCurrentSKP; | 36 int fCurrentSKP; |
35 }; | 37 }; |
36 | 38 |
37 #endif | 39 #endif |
OLD | NEW |