Index: tools/VisualBench/VisualBenchmarkStream.cpp |
diff --git a/tools/VisualBench/VisualBenchmarkStream.cpp b/tools/VisualBench/VisualBenchmarkStream.cpp |
index 1f166640813a8d2f422e3a76ea8e9e859fdc9ded..e3eb44d5b9c76bc1577bd52ff17fd19b64b3d9b9 100644 |
--- a/tools/VisualBench/VisualBenchmarkStream.cpp |
+++ b/tools/VisualBench/VisualBenchmarkStream.cpp |
@@ -68,7 +68,9 @@ Benchmark* VisualBenchmarkStream::next() { |
Benchmark* bench; |
// skips non matching benches |
while ((bench = this->innerNext()) && |
- SkCommandLineFlags::ShouldSkip(FLAGS_match, bench->getUniqueName())) { |
+ (SkCommandLineFlags::ShouldSkip(FLAGS_match, bench->getUniqueName()) || |
+ !bench->isSuitableFor(Benchmark::kGPU_Backend))) { |
+ bench->unref(); |
} |
return bench; |
} |
@@ -82,6 +84,7 @@ Benchmark* VisualBenchmarkStream::innerNext() { |
fBenchType = "micro"; |
return bench; |
} |
+ bench->unref(); |
} |
while (fGMs) { |