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."); | |
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)); | |
tomhudson
2016/06/01 16:54:59
The documentation says mskps is a directory, but w
hal.canary
2016/06/02 13:24:04
Done. (doc fixed)
| |
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 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1383 #endif | 1398 #endif |
1384 } | 1399 } |
1385 } // namespace skiatest | 1400 } // namespace skiatest |
1386 | 1401 |
1387 #if !defined(SK_BUILD_FOR_IOS) | 1402 #if !defined(SK_BUILD_FOR_IOS) |
1388 int main(int argc, char** argv) { | 1403 int main(int argc, char** argv) { |
1389 SkCommandLineFlags::Parse(argc, argv); | 1404 SkCommandLineFlags::Parse(argc, argv); |
1390 return dm_main(); | 1405 return dm_main(); |
1391 } | 1406 } |
1392 #endif | 1407 #endif |
OLD | NEW |