Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: tools/VisualBench/VisualBenchmarkStream.cpp

Issue 1239103002: Fix visual bench memory leak (Closed) Base URL: https://skia.googlesource.com/skia.git@fixvb1
Patch Set: tweaks Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/VisualBench/VisualBench.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « tools/VisualBench/VisualBench.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698