OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "CrashHandler.h" | 8 #include "CrashHandler.h" |
9 #include "DMJsonWriter.h" | 9 #include "DMJsonWriter.h" |
10 #include "DMSrcSink.h" | 10 #include "DMSrcSink.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 DEFINE_string2(readPath, r, "", "If set check for equality with golden results i
n this directory."); | 65 DEFINE_string2(readPath, r, "", "If set check for equality with golden results i
n this directory."); |
66 | 66 |
67 DEFINE_string(uninterestingHashesFile, "", | 67 DEFINE_string(uninterestingHashesFile, "", |
68 "File containing a list of uninteresting hashes. If a result hashes to s
omething in " | 68 "File containing a list of uninteresting hashes. If a result hashes to s
omething in " |
69 "this list, no image is written for that result."); | 69 "this list, no image is written for that result."); |
70 | 70 |
71 DEFINE_int32(shards, 1, "We're splitting source data into this many shards."); | 71 DEFINE_int32(shards, 1, "We're splitting source data into this many shards."); |
72 DEFINE_int32(shard, 0, "Which shard do I run?"); | 72 DEFINE_int32(shard, 0, "Which shard do I run?"); |
73 DEFINE_bool(simpleCodec, false, "Only decode images to native scale"); | 73 DEFINE_bool(simpleCodec, false, "Only decode images to native scale"); |
74 | 74 |
| 75 DEFINE_string(mskps, "", "Directory to read mskps from, or a single mskp file.")
; |
| 76 |
75 using namespace DM; | 77 using namespace DM; |
76 using sk_gpu_test::GrContextFactory; | 78 using sk_gpu_test::GrContextFactory; |
77 using sk_gpu_test::GLTestContext; | 79 using sk_gpu_test::GLTestContext; |
78 using sk_gpu_test::ContextInfo; | 80 using sk_gpu_test::ContextInfo; |
79 | 81 |
80 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~*/ | 82 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~*/ |
81 | 83 |
82 static const double kStartMs = SkTime::GetMSecs(); | 84 static const double kStartMs = SkTime::GetMSecs(); |
83 | 85 |
84 static FILE* gVLog; | 86 static FILE* gVLog; |
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
695 if (sk_isdir(path)) { | 697 if (sk_isdir(path)) { |
696 SkOSFile::Iter it(path, "skp"); | 698 SkOSFile::Iter it(path, "skp"); |
697 for (SkString file; it.next(&file); ) { | 699 for (SkString file; it.next(&file); ) { |
698 push_src("skp", "", new SKPSrc(SkOSPath::Join(path, file.c_str()
))); | 700 push_src("skp", "", new SKPSrc(SkOSPath::Join(path, file.c_str()
))); |
699 } | 701 } |
700 } else { | 702 } else { |
701 push_src("skp", "", new SKPSrc(path)); | 703 push_src("skp", "", new SKPSrc(path)); |
702 } | 704 } |
703 } | 705 } |
704 | 706 |
| 707 for (int i = 0; i < FLAGS_mskps.count(); i++) { |
| 708 const char* path = FLAGS_mskps[i]; |
| 709 if (sk_isdir(path)) { |
| 710 SkOSFile::Iter it(path, "mskp"); |
| 711 for (SkString file; it.next(&file);) { |
| 712 push_src("mskp", "", |
| 713 new MSKPSrc(SkOSPath::Join(path, file.c_str()))); |
| 714 } |
| 715 } else { |
| 716 push_src("mskp", "", new MSKPSrc(path)); |
| 717 } |
| 718 } |
| 719 |
705 SkTArray<SkString> images; | 720 SkTArray<SkString> images; |
706 if (!CollectImages(FLAGS_images, &images)) { | 721 if (!CollectImages(FLAGS_images, &images)) { |
707 return false; | 722 return false; |
708 } | 723 } |
709 | 724 |
710 for (auto image : images) { | 725 for (auto image : images) { |
711 push_codec_srcs(image); | 726 push_codec_srcs(image); |
712 if (FLAGS_simpleCodec) { | 727 if (FLAGS_simpleCodec) { |
713 continue; | 728 continue; |
714 } | 729 } |
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1388 #endif | 1403 #endif |
1389 } | 1404 } |
1390 } // namespace skiatest | 1405 } // namespace skiatest |
1391 | 1406 |
1392 #if !defined(SK_BUILD_FOR_IOS) | 1407 #if !defined(SK_BUILD_FOR_IOS) |
1393 int main(int argc, char** argv) { | 1408 int main(int argc, char** argv) { |
1394 SkCommandLineFlags::Parse(argc, argv); | 1409 SkCommandLineFlags::Parse(argc, argv); |
1395 return dm_main(); | 1410 return dm_main(); |
1396 } | 1411 } |
1397 #endif | 1412 #endif |
OLD | NEW |