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

Side by Side Diff: tools/bench_record.cpp

Issue 428443002: Cleanup: Rename SkOSPath functions. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix Created 6 years, 4 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/bench_playback.cpp ('k') | tools/filtermain.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 2014 Google Inc. 2 * Copyright 2014 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 #include "SkCommandLineFlags.h" 8 #include "SkCommandLineFlags.h"
9 #include "SkForceLinking.h" 9 #include "SkForceLinking.h"
10 #include "SkGraphics.h" 10 #include "SkGraphics.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 overheadEstimate /= kOverheadLoops; 142 overheadEstimate /= kOverheadLoops;
143 143
144 SkOSFile::Iter it(FLAGS_skps[0], ".skp"); 144 SkOSFile::Iter it(FLAGS_skps[0], ".skp");
145 SkString filename; 145 SkString filename;
146 bool failed = false; 146 bool failed = false;
147 while (it.next(&filename)) { 147 while (it.next(&filename)) {
148 if (SkCommandLineFlags::ShouldSkip(FLAGS_match, filename.c_str())) { 148 if (SkCommandLineFlags::ShouldSkip(FLAGS_match, filename.c_str())) {
149 continue; 149 continue;
150 } 150 }
151 151
152 const SkString path = SkOSPath::SkPathJoin(FLAGS_skps[0], filename.c_str ()); 152 const SkString path = SkOSPath::Join(FLAGS_skps[0], filename.c_str());
153 153
154 SkAutoTUnref<SkStream> stream(SkStream::NewFromFile(path.c_str())); 154 SkAutoTUnref<SkStream> stream(SkStream::NewFromFile(path.c_str()));
155 if (!stream) { 155 if (!stream) {
156 SkDebugf("Could not read %s.\n", path.c_str()); 156 SkDebugf("Could not read %s.\n", path.c_str());
157 failed = true; 157 failed = true;
158 continue; 158 continue;
159 } 159 }
160 SkAutoTUnref<SkPicture> src( 160 SkAutoTUnref<SkPicture> src(
161 SkPicture::CreateFromStream(stream, sk_tools::LazyDecodeBitmap)); 161 SkPicture::CreateFromStream(stream, sk_tools::LazyDecodeBitmap));
162 if (!src) { 162 if (!src) {
163 SkDebugf("Could not read %s as an SkPicture.\n", path.c_str()); 163 SkDebugf("Could not read %s as an SkPicture.\n", path.c_str());
164 failed = true; 164 failed = true;
165 continue; 165 continue;
166 } 166 }
167 bench_record(*src, overheadEstimate, filename.c_str(), bbhFactory.get()) ; 167 bench_record(*src, overheadEstimate, filename.c_str(), bbhFactory.get()) ;
168 } 168 }
169 return failed ? 1 : 0; 169 return failed ? 1 : 0;
170 } 170 }
171 171
172 #if !defined SK_BUILD_FOR_IOS 172 #if !defined SK_BUILD_FOR_IOS
173 int main(int argc, char * const argv[]) { 173 int main(int argc, char * const argv[]) {
174 return tool_main(argc, (char**) argv); 174 return tool_main(argc, (char**) argv);
175 } 175 }
176 #endif 176 #endif
OLDNEW
« no previous file with comments | « tools/bench_playback.cpp ('k') | tools/filtermain.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698