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 #include "VisualFlags.h" |
16 | 17 |
17 DECLARE_string(match); | 18 DECLARE_string(match); |
18 | 19 |
19 class VisualBenchmarkStream { | 20 class VisualBenchmarkStream { |
20 public: | 21 public: |
21 VisualBenchmarkStream(); | 22 VisualBenchmarkStream(); |
22 | 23 |
23 static bool ReadPicture(const char* path, SkAutoTUnref<SkPicture>* pic); | 24 static bool ReadPicture(const char* path, SkAutoTUnref<SkPicture>* pic); |
24 | 25 |
25 Benchmark* next(); | 26 Benchmark* next(Configs::Config); |
26 Benchmark* current() { return fBenchmark.get(); } | 27 Benchmark* current() { return fBenchmark.get(); } |
27 | 28 |
28 private: | 29 private: |
29 Benchmark* innerNext(); | 30 Benchmark* innerNext(); |
30 | 31 |
31 const BenchRegistry* fBenches; | 32 const BenchRegistry* fBenches; |
32 const skiagm::GMRegistry* fGMs; | 33 const skiagm::GMRegistry* fGMs; |
33 SkTArray<SkString> fSKPs; | 34 SkTArray<SkString> fSKPs; |
34 SkAutoTUnref<Benchmark> fBenchmark; | 35 SkAutoTUnref<Benchmark> fBenchmark; |
35 | 36 |
36 const char* fSourceType; // What we're benching: bench, GM, SKP, ... | 37 const char* fSourceType; // What we're benching: bench, GM, SKP, ... |
37 const char* fBenchType; // How we bench it: micro, playback, ... | 38 const char* fBenchType; // How we bench it: micro, playback, ... |
38 int fCurrentSKP; | 39 int fCurrentSKP; |
39 bool fIsWarmedUp; | 40 bool fIsWarmedUp; |
40 }; | 41 }; |
41 | 42 |
42 #endif | 43 #endif |
OLD | NEW |