Index: tools/VisualBench/VisualBenchmarkStream.cpp |
diff --git a/tools/VisualBench/VisualBenchmarkStream.cpp b/tools/VisualBench/VisualBenchmarkStream.cpp |
index 841fb5d11bc8d457b43b9d694d13628951a54684..1f166640813a8d2f422e3a76ea8e9e859fdc9ded 100644 |
--- a/tools/VisualBench/VisualBenchmarkStream.cpp |
+++ b/tools/VisualBench/VisualBenchmarkStream.cpp |
@@ -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(); |