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 "BenchLogger.h" | 8 #include "BenchLogger.h" |
9 #include "Timer.h" | 9 #include "Timer.h" |
10 #include "CopyTilesRenderer.h" | 10 #include "CopyTilesRenderer.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 DEFINE_bool(purgeDecodedTex, false, "Purge decoded and GPU-uploaded textures " | 50 DEFINE_bool(purgeDecodedTex, false, "Purge decoded and GPU-uploaded textures " |
51 "after each iteration."); | 51 "after each iteration."); |
52 DEFINE_string(timers, "c", "[wcgWC]*: Display wall, cpu, gpu, truncated wall or
truncated cpu time" | 52 DEFINE_string(timers, "c", "[wcgWC]*: Display wall, cpu, gpu, truncated wall or
truncated cpu time" |
53 " for each picture."); | 53 " for each picture."); |
54 DEFINE_bool(trackDeferredCaching, false, "Only meaningful with --deferImageDecod
ing and " | 54 DEFINE_bool(trackDeferredCaching, false, "Only meaningful with --deferImageDecod
ing and " |
55 "SK_LAZY_CACHE_STATS set to true. Report percentage of cache hits wh
en using " | 55 "SK_LAZY_CACHE_STATS set to true. Report percentage of cache hits wh
en using " |
56 "deferred image decoding."); | 56 "deferred image decoding."); |
57 | 57 |
58 DEFINE_bool(preprocess, false, "If true, perform device specific preprocessing b
efore timing."); | 58 DEFINE_bool(preprocess, false, "If true, perform device specific preprocessing b
efore timing."); |
59 | 59 |
| 60 // Buildbot-specific parameters |
| 61 DEFINE_string(builderName, "", "Name of the builder this is running on."); |
| 62 DEFINE_int32(buildNumber, -1, "Build number of the build this test is running on
"); |
| 63 DEFINE_int32(timestamp, 0, "Timestamp of the revision of Skia being tested."); |
| 64 DEFINE_string(gitHash, "", "Commit hash of the revision of Skia being run."); |
| 65 DEFINE_int32(gitNumber, -1, "Git number of the revision of Skia being run."); |
| 66 |
| 67 |
60 static char const * const gFilterTypes[] = { | 68 static char const * const gFilterTypes[] = { |
61 "paint", | 69 "paint", |
62 "point", | 70 "point", |
63 "line", | 71 "line", |
64 "bitmap", | 72 "bitmap", |
65 "rect", | 73 "rect", |
66 "oval", | 74 "oval", |
67 "path", | 75 "path", |
68 "text", | 76 "text", |
69 "all", | 77 "all", |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 gLogger.logError(str); | 422 gLogger.logError(str); |
415 // TODO(borenet): We're disabling this for now, due to | 423 // TODO(borenet): We're disabling this for now, due to |
416 // write-protected Android devices. The very short-term | 424 // write-protected Android devices. The very short-term |
417 // solution is to ignore the fact that we have no log file. | 425 // solution is to ignore the fact that we have no log file. |
418 //exit(-1); | 426 //exit(-1); |
419 } | 427 } |
420 } | 428 } |
421 | 429 |
422 SkAutoTDelete<PictureJSONResultsWriter> jsonWriter; | 430 SkAutoTDelete<PictureJSONResultsWriter> jsonWriter; |
423 if (FLAGS_jsonLog.count() == 1) { | 431 if (FLAGS_jsonLog.count() == 1) { |
424 jsonWriter.reset(SkNEW(PictureJSONResultsWriter(FLAGS_jsonLog[0]))); | 432 SkASSERT(FLAGS_builderName.count() == 1 && FLAGS_gitHash.count() == 1); |
| 433 jsonWriter.reset(SkNEW(PictureJSONResultsWriter( |
| 434 FLAGS_jsonLog[0], |
| 435 FLAGS_builderName[0], |
| 436 FLAGS_buildNumber, |
| 437 FLAGS_timestamp, |
| 438 FLAGS_gitHash[0], |
| 439 FLAGS_gitNumber))); |
425 gWriter.add(jsonWriter.get()); | 440 gWriter.add(jsonWriter.get()); |
426 } | 441 } |
427 | 442 |
428 gWriter.add(&gLogWriter); | 443 gWriter.add(&gLogWriter); |
429 | 444 |
430 | 445 |
431 #if SK_ENABLE_INST_COUNT | 446 #if SK_ENABLE_INST_COUNT |
432 gPrintInstCount = true; | 447 gPrintInstCount = true; |
433 #endif | 448 #endif |
434 SkAutoGraphics ag; | 449 SkAutoGraphics ag; |
(...skipping 21 matching lines...) Expand all Loading... |
456 #endif | 471 #endif |
457 gWriter.end(); | 472 gWriter.end(); |
458 return 0; | 473 return 0; |
459 } | 474 } |
460 | 475 |
461 #if !defined SK_BUILD_FOR_IOS | 476 #if !defined SK_BUILD_FOR_IOS |
462 int main(int argc, char * const argv[]) { | 477 int main(int argc, char * const argv[]) { |
463 return tool_main(argc, (char**) argv); | 478 return tool_main(argc, (char**) argv); |
464 } | 479 } |
465 #endif | 480 #endif |
OLD | NEW |