2015-06-30 14:43:14 +00:00
|
|
|
/*
|
|
|
|
* 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();
|
2015-10-15 14:18:29 +00:00
|
|
|
Benchmark* current() { return fBenchmark.get(); }
|
2015-06-30 14:43:14 +00:00
|
|
|
|
|
|
|
private:
|
2015-07-15 15:38:02 +00:00
|
|
|
Benchmark* innerNext();
|
|
|
|
|
2015-06-30 14:43:14 +00:00
|
|
|
const BenchRegistry* fBenches;
|
|
|
|
const skiagm::GMRegistry* fGMs;
|
|
|
|
SkTArray<SkString> fSKPs;
|
2015-10-15 14:18:29 +00:00
|
|
|
SkAutoTUnref<Benchmark> fBenchmark;
|
2015-06-30 14:43:14 +00:00
|
|
|
|
|
|
|
const char* fSourceType; // What we're benching: bench, GM, SKP, ...
|
|
|
|
const char* fBenchType; // How we bench it: micro, playback, ...
|
|
|
|
int fCurrentSKP;
|
2015-10-05 14:23:30 +00:00
|
|
|
bool fIsWarmedUp;
|
2015-06-30 14:43:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|