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

Side by Side Diff: tools/VisualBench/VisualBenchmarkStream.cpp

Issue 1444543002: Add visualbench option for nvpr stencil samples (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_fix_triple_buffer
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « tools/VisualBench/VisualBench.cpp ('k') | tools/VisualBench/VisualFlags.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 * 6 *
7 */ 7 */
8 8
9 #include <VisualBench/VisualBenchmarkStream.h> 9 #include <VisualBench/VisualBenchmarkStream.h>
10 #include <VisualBench/WrappedBenchmark.h> 10 #include <VisualBench/WrappedBenchmark.h>
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 while ((bench = this->innerNext()) && 124 while ((bench = this->innerNext()) &&
125 (SkCommandLineFlags::ShouldSkip(FLAGS_match, bench->getUniqueName ()) || 125 (SkCommandLineFlags::ShouldSkip(FLAGS_match, bench->getUniqueName ()) ||
126 !bench->isSuitableFor(Benchmark::kGPU_Backend))) { 126 !bench->isSuitableFor(Benchmark::kGPU_Backend))) {
127 bench->unref(); 127 bench->unref();
128 } 128 }
129 } 129 }
130 130
131 // TODO move this all to --config 131 // TODO move this all to --config
132 if (bench && FLAGS_cpu) { 132 if (bench && FLAGS_cpu) {
133 bench = new CpuWrappedBenchmark(fSurfaceProps, bench); 133 bench = new CpuWrappedBenchmark(fSurfaceProps, bench);
134 } else if (bench && FLAGS_nvpr) { 134 } else if (bench && 0 != FLAGS_nvpr) {
135 bench = new NvprWrappedBenchmark(fSurfaceProps, bench, 4); 135 bench = new NvprWrappedBenchmark(fSurfaceProps, bench, FLAGS_nvpr);
136 } 136 }
137 137
138 fBenchmark.reset(bench); 138 fBenchmark.reset(bench);
139 return fBenchmark; 139 return fBenchmark;
140 } 140 }
141 141
142 Benchmark* VisualBenchmarkStream::innerNext() { 142 Benchmark* VisualBenchmarkStream::innerNext() {
143 while (fBenches) { 143 while (fBenches) {
144 Benchmark* bench = fBenches->factory()(nullptr); 144 Benchmark* bench = fBenches->factory()(nullptr);
145 fBenches = fBenches->next(); 145 fBenches = fBenches->next();
(...skipping 24 matching lines...) Expand all
170 } 170 }
171 171
172 SkString name = SkOSPath::Basename(path.c_str()); 172 SkString name = SkOSPath::Basename(path.c_str());
173 fSourceType = "skp"; 173 fSourceType = "skp";
174 fBenchType = "playback"; 174 fBenchType = "playback";
175 return new VisualSKPBench(name.c_str(), pic.get()); 175 return new VisualSKPBench(name.c_str(), pic.get());
176 } 176 }
177 177
178 return nullptr; 178 return nullptr;
179 } 179 }
OLDNEW
« no previous file with comments | « tools/VisualBench/VisualBench.cpp ('k') | tools/VisualBench/VisualFlags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698