OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |