Match works correctly on visualbench

BUG=skia:

Review URL: https://codereview.chromium.org/1234123004
This commit is contained in:
joshualitt 2015-07-15 08:38:02 -07:00 committed by Commit bot
parent 4524813cbc
commit 82874f8b28
2 changed files with 11 additions and 0 deletions

View File

@ -65,6 +65,15 @@ bool VisualBenchmarkStream::ReadPicture(const char* path, SkAutoTUnref<SkPicture
}
Benchmark* VisualBenchmarkStream::next() {
Benchmark* bench;
// skips non matching benches
while ((bench = this->innerNext()) &&
SkCommandLineFlags::ShouldSkip(FLAGS_match, bench->getUniqueName())) {
}
return bench;
}
Benchmark* VisualBenchmarkStream::innerNext() {
while (fBenches) {
Benchmark* bench = fBenches->factory()(NULL);
fBenches = fBenches->next();

View File

@ -25,6 +25,8 @@ public:
Benchmark* next();
private:
Benchmark* innerNext();
const BenchRegistry* fBenches;
const skiagm::GMRegistry* fGMs;
SkTArray<SkString> fSKPs;