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