diff options
author | 2015-06-30 07:43:14 -0700 | |
---|---|---|
committer | 2015-06-30 07:43:14 -0700 | |
commit | 962cc98eb49c5bb9b8c8382e7709e6f4b32ebce0 (patch) | |
tree | bafb71b84193dad66ffff47ce95140209773dc0f /tools/VisualBench/VisualBenchmarkStream.h | |
parent | 2757e3f09d7aae00ebe6c12b55668a89bd71aee1 (diff) |
Add benchmarkstream to visualbench
BUG=skia:
Review URL: https://codereview.chromium.org/1215033002
Diffstat (limited to 'tools/VisualBench/VisualBenchmarkStream.h')
-rw-r--r-- | tools/VisualBench/VisualBenchmarkStream.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tools/VisualBench/VisualBenchmarkStream.h b/tools/VisualBench/VisualBenchmarkStream.h new file mode 100644 index 0000000000..4c6a1eb262 --- /dev/null +++ b/tools/VisualBench/VisualBenchmarkStream.h @@ -0,0 +1,37 @@ +/* + * Copyright 2015 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + * + */ + +#ifndef VisualBenchmarkStream_DEFINED +#define VisualBenchmarkStream_DEFINED + +#include "Benchmark.h" +#include "gm.h" +#include "SkCommandLineFlags.h" +#include "SkPicture.h" + +DECLARE_string(match); + +class VisualBenchmarkStream { +public: + VisualBenchmarkStream(); + + static bool ReadPicture(const char* path, SkAutoTUnref<SkPicture>* pic); + + Benchmark* next(); + +private: + const BenchRegistry* fBenches; + const skiagm::GMRegistry* fGMs; + SkTArray<SkString> fSKPs; + + const char* fSourceType; // What we're benching: bench, GM, SKP, ... + const char* fBenchType; // How we bench it: micro, playback, ... + int fCurrentSKP; +}; + +#endif |