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

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

Issue 1234123004: Match works correctly on visualbench (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « tools/VisualBench/VisualBenchmarkStream.h ('k') | no next file » | 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 "GMBench.h" 10 #include "GMBench.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 pic->reset(SkPicture::CreateFromStream(stream.get())); 59 pic->reset(SkPicture::CreateFromStream(stream.get()));
60 if (pic->get() == NULL) { 60 if (pic->get() == NULL) {
61 SkDebugf("Could not read %s as an SkPicture.\n", path); 61 SkDebugf("Could not read %s as an SkPicture.\n", path);
62 return false; 62 return false;
63 } 63 }
64 return true; 64 return true;
65 } 65 }
66 66
67 Benchmark* VisualBenchmarkStream::next() { 67 Benchmark* VisualBenchmarkStream::next() {
68 Benchmark* bench;
robertphillips 2015/07/15 15:25:40 // skip non-matching benchs ?
69 while ((bench = this->innerNext()) &&
robertphillips 2015/07/15 15:25:40 Maybe put the '}' on its own line ?
70 SkCommandLineFlags::ShouldSkip(FLAGS_match, bench->getUniqueName())) {}
71 return bench;
72 }
73
74 Benchmark* VisualBenchmarkStream::innerNext() {
68 while (fBenches) { 75 while (fBenches) {
69 Benchmark* bench = fBenches->factory()(NULL); 76 Benchmark* bench = fBenches->factory()(NULL);
70 fBenches = fBenches->next(); 77 fBenches = fBenches->next();
71 if (bench->isVisual()) { 78 if (bench->isVisual()) {
72 fSourceType = "bench"; 79 fSourceType = "bench";
73 fBenchType = "micro"; 80 fBenchType = "micro";
74 return bench; 81 return bench;
75 } 82 }
76 } 83 }
77 84
(...skipping 16 matching lines...) Expand all
94 } 101 }
95 102
96 SkString name = SkOSPath::Basename(path.c_str()); 103 SkString name = SkOSPath::Basename(path.c_str());
97 fSourceType = "skp"; 104 fSourceType = "skp";
98 fBenchType = "playback"; 105 fBenchType = "playback";
99 return SkNEW_ARGS(VisualSKPBench, (name.c_str(), pic.get())); 106 return SkNEW_ARGS(VisualSKPBench, (name.c_str(), pic.get()));
100 } 107 }
101 108
102 return NULL; 109 return NULL;
103 } 110 }
OLDNEW
« no previous file with comments | « tools/VisualBench/VisualBenchmarkStream.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698