skia2/tools/VisualBench/VisualBenchmarkStream.h
joshualitt a3b8c67ea6 Revert of small tidy of benchmarkstream (patchset #2 id:20001 of https://codereview.chromium.org/1395703002/ )
Reason for revert:
Breaks visualbench

Original issue's description:
> small tidy of benchmarkstream
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/691b6af907e55250a29a7a2a346b63c2026011c3

TBR=robertphillips@google.com,joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1392833006
2015-10-14 14:45:07 -07:00

41 lines
853 B
C++

/*
* 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:
Benchmark* innerNext();
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;
bool fIsWarmedUp;
};
#endif