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

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

Issue 1809733002: detach -> release (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: (C) Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « tools/VisualBench/VisualBench.cpp ('k') | tools/debugger/SkDrawCommand.cpp » ('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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 } 161 }
162 bench->unref(); 162 bench->unref();
163 } 163 }
164 164
165 while (fGMs) { 165 while (fGMs) {
166 SkAutoTDelete<skiagm::GM> gm(fGMs->factory()(nullptr)); 166 SkAutoTDelete<skiagm::GM> gm(fGMs->factory()(nullptr));
167 fGMs = fGMs->next(); 167 fGMs = fGMs->next();
168 if (gm->runAsBench()) { 168 if (gm->runAsBench()) {
169 fSourceType = "gm"; 169 fSourceType = "gm";
170 fBenchType = "micro"; 170 fBenchType = "micro";
171 return new GMBench(gm.detach()); 171 return new GMBench(gm.release());
172 } 172 }
173 } 173 }
174 174
175 // Render skps 175 // Render skps
176 while (fCurrentSKP < fSKPs.count()) { 176 while (fCurrentSKP < fSKPs.count()) {
177 const SkString& path = fSKPs[fCurrentSKP++]; 177 const SkString& path = fSKPs[fCurrentSKP++];
178 SkAutoTUnref<SkPicture> pic; 178 SkAutoTUnref<SkPicture> pic;
179 if (!ReadPicture(path.c_str(), &pic)) { 179 if (!ReadPicture(path.c_str(), &pic)) {
180 continue; 180 continue;
181 } 181 }
182 182
183 SkString name = SkOSPath::Basename(path.c_str()); 183 SkString name = SkOSPath::Basename(path.c_str());
184 fSourceType = "skp"; 184 fSourceType = "skp";
185 fBenchType = "playback"; 185 fBenchType = "playback";
186 return new VisualSKPBench(name.c_str(), pic.get()); 186 return new VisualSKPBench(name.c_str(), pic.get());
187 } 187 }
188 188
189 return nullptr; 189 return nullptr;
190 } 190 }
OLDNEW
« no previous file with comments | « tools/VisualBench/VisualBench.cpp ('k') | tools/debugger/SkDrawCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698