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 "PictureBenchmark.h" | 10 #include "PictureBenchmark.h" |
11 #include "PictureRenderingFlags.h" | 11 #include "PictureRenderingFlags.h" |
12 #include "SkBenchLogger.h" | 12 #include "SkBenchLogger.h" |
13 #include "SkFlags.h" | 13 #include "SkCommandLineFlags.h" |
14 #include "SkGraphics.h" | 14 #include "SkGraphics.h" |
15 #include "SkImageDecoder.h" | 15 #include "SkImageDecoder.h" |
16 #if LAZY_CACHE_STATS | 16 #if LAZY_CACHE_STATS |
17 #include "SkLazyPixelRef.h" | 17 #include "SkLazyPixelRef.h" |
18 #endif | 18 #endif |
19 #include "SkLruImageCache.h" | 19 #include "SkLruImageCache.h" |
20 #include "SkMath.h" | 20 #include "SkMath.h" |
21 #include "SkOSFile.h" | 21 #include "SkOSFile.h" |
22 #include "SkPicture.h" | 22 #include "SkPicture.h" |
23 #include "SkStream.h" | 23 #include "SkStream.h" |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 } | 383 } |
384 return failures; | 384 return failures; |
385 } | 385 } |
386 | 386 |
387 int tool_main(int argc, char** argv); | 387 int tool_main(int argc, char** argv); |
388 int tool_main(int argc, char** argv) { | 388 int tool_main(int argc, char** argv) { |
389 SkString usage; | 389 SkString usage; |
390 usage.printf("Time drawing .skp files.\n" | 390 usage.printf("Time drawing .skp files.\n" |
391 "\tPossible arguments for --filter: [%s]\n\t\t[%s]", | 391 "\tPossible arguments for --filter: [%s]\n\t\t[%s]", |
392 filterTypesUsage().c_str(), filterFlagsUsage().c_str()); | 392 filterTypesUsage().c_str(), filterFlagsUsage().c_str()); |
393 SkFlags::SetUsage(usage.c_str()); | 393 SkCommandLineFlags::SetUsage(usage.c_str()); |
394 SkFlags::ParseCommandLine(argc, argv); | 394 SkCommandLineFlags::Parse(argc, argv); |
395 | 395 |
396 if (FLAGS_repeat < 1) { | 396 if (FLAGS_repeat < 1) { |
397 SkString error; | 397 SkString error; |
398 error.printf("--repeats must be >= 1. Was %i\n", FLAGS_repeat); | 398 error.printf("--repeats must be >= 1. Was %i\n", FLAGS_repeat); |
399 gLogger.logError(error); | 399 gLogger.logError(error); |
400 exit(-1); | 400 exit(-1); |
401 } | 401 } |
402 | 402 |
403 if (FLAGS_logFile.count() == 1) { | 403 if (FLAGS_logFile.count() == 1) { |
404 if (!gLogger.SetLogFile(FLAGS_logFile[0])) { | 404 if (!gLogger.SetLogFile(FLAGS_logFile[0])) { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 } | 440 } |
441 #endif | 441 #endif |
442 return 0; | 442 return 0; |
443 } | 443 } |
444 | 444 |
445 #if !defined SK_BUILD_FOR_IOS | 445 #if !defined SK_BUILD_FOR_IOS |
446 int main(int argc, char * const argv[]) { | 446 int main(int argc, char * const argv[]) { |
447 return tool_main(argc, (char**) argv); | 447 return tool_main(argc, (char**) argv); |
448 } | 448 } |
449 #endif | 449 #endif |
OLD | NEW |