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

Side by Side Diff: tools/bench_pictures_main.cpp

Issue 321693002: Cleanup: Delete sk_tools::get_basename() in favor of SkOSPath::SkBasename(). (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rm is_path_seperator() Created 6 years, 6 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 | « tests/PictureUtilsTest.cpp ('k') | tools/picture_utils.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 2012 Google Inc. 2 * Copyright 2012 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 "BenchTimer.h" 8 #include "BenchTimer.h"
9 #include "CopyTilesRenderer.h" 9 #include "CopyTilesRenderer.h"
10 #include "LazyDecodeBitmap.h" 10 #include "LazyDecodeBitmap.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 } 184 }
185 SkAutoTUnref<SkPicture> picture(SkPicture::CreateFromStream(&inputStream, pr oc)); 185 SkAutoTUnref<SkPicture> picture(SkPicture::CreateFromStream(&inputStream, pr oc));
186 186
187 if (NULL == picture.get()) { 187 if (NULL == picture.get()) {
188 SkString err; 188 SkString err;
189 err.printf("Could not read an SkPicture from %s\n", inputPath.c_str()); 189 err.printf("Could not read an SkPicture from %s\n", inputPath.c_str());
190 gLogger.logError(err); 190 gLogger.logError(err);
191 return false; 191 return false;
192 } 192 }
193 193
194 SkString filename; 194 SkString filename = SkOSPath::SkBasename(inputPath.c_str());
195 sk_tools::get_basename(&filename, inputPath);
196 195
197 gWriter.bench(filename.c_str(), picture->width(), picture->height()); 196 gWriter.bench(filename.c_str(), picture->width(), picture->height());
198 197
199 benchmark.run(picture); 198 benchmark.run(picture);
200 199
201 #if SK_LAZY_CACHE_STATS 200 #if SK_LAZY_CACHE_STATS
202 if (FLAGS_trackDeferredCaching) { 201 if (FLAGS_trackDeferredCaching) {
203 int cacheHits = pool->getCacheHits(); 202 int cacheHits = pool->getCacheHits();
204 int cacheMisses = pool->getCacheMisses(); 203 int cacheMisses = pool->getCacheMisses();
205 pool->resetCacheHitsAndMisses(); 204 pool->resetCacheHitsAndMisses();
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 #endif 459 #endif
461 gWriter.end(); 460 gWriter.end();
462 return 0; 461 return 0;
463 } 462 }
464 463
465 #if !defined SK_BUILD_FOR_IOS 464 #if !defined SK_BUILD_FOR_IOS
466 int main(int argc, char * const argv[]) { 465 int main(int argc, char * const argv[]) {
467 return tool_main(argc, (char**) argv); 466 return tool_main(argc, (char**) argv);
468 } 467 }
469 #endif 468 #endif
OLDNEW
« no previous file with comments | « tests/PictureUtilsTest.cpp ('k') | tools/picture_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698