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 "DMJsonWriter.h" | 8 #include "DMJsonWriter.h" |
9 #include "DMSrcSink.h" | 9 #include "DMSrcSink.h" |
10 #include "DMSrcSinkAndroid.h" | 10 #include "DMSrcSinkAndroid.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "SkOSFile.h" | 27 #include "SkOSFile.h" |
28 #include "SkPM4fPriv.h" | 28 #include "SkPM4fPriv.h" |
29 #include "SkSpinlock.h" | 29 #include "SkSpinlock.h" |
30 #include "SkTHash.h" | 30 #include "SkTHash.h" |
31 #include "SkTaskGroup.h" | 31 #include "SkTaskGroup.h" |
32 #include "SkThreadUtils.h" | 32 #include "SkThreadUtils.h" |
33 #include "Test.h" | 33 #include "Test.h" |
34 #include "Timer.h" | 34 #include "Timer.h" |
35 #include "picture_utils.h" | 35 #include "picture_utils.h" |
36 #include "sk_tool_utils.h" | 36 #include "sk_tool_utils.h" |
37 #include "SkScan.h" | |
38 | 37 |
39 #ifdef SK_PDF_IMAGE_STATS | 38 #ifdef SK_PDF_IMAGE_STATS |
40 extern void SkPDFImageDumpStats(); | 39 extern void SkPDFImageDumpStats(); |
41 #endif | 40 #endif |
42 | 41 |
43 #include "png.h" | 42 #include "png.h" |
44 | 43 |
45 #include <stdlib.h> | 44 #include <stdlib.h> |
46 | 45 |
47 #ifndef SK_BUILD_FOR_WIN32 | 46 #ifndef SK_BUILD_FOR_WIN32 |
(...skipping 19 matching lines...) Expand all Loading... |
67 | 66 |
68 DEFINE_string(uninterestingHashesFile, "", | 67 DEFINE_string(uninterestingHashesFile, "", |
69 "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 " |
70 "this list, no image is written for that result."); | 69 "this list, no image is written for that result."); |
71 | 70 |
72 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."); |
73 DEFINE_int32(shard, 0, "Which shard do I run?"); | 72 DEFINE_int32(shard, 0, "Which shard do I run?"); |
74 | 73 |
75 DEFINE_string(mskps, "", "Directory to read mskps from, or a single mskp file.")
; | 74 DEFINE_string(mskps, "", "Directory to read mskps from, or a single mskp file.")
; |
76 | 75 |
77 DEFINE_bool(analyticAA, false, "Analytic Anti-Alias"); | |
78 | |
79 using namespace DM; | 76 using namespace DM; |
80 using sk_gpu_test::GrContextFactory; | 77 using sk_gpu_test::GrContextFactory; |
81 using sk_gpu_test::GLTestContext; | 78 using sk_gpu_test::GLTestContext; |
82 using sk_gpu_test::ContextInfo; | 79 using sk_gpu_test::ContextInfo; |
83 | 80 |
84 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~*/ | 81 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~*/ |
85 | 82 |
86 static const double kStartMs = SkTime::GetMSecs(); | 83 static const double kStartMs = SkTime::GetMSecs(); |
87 | 84 |
88 static FILE* gVLog; | 85 static FILE* gVLog; |
(...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1270 | 1267 |
1271 #undef PORTABLE_FONT_PREFIX | 1268 #undef PORTABLE_FONT_PREFIX |
1272 | 1269 |
1273 extern sk_sp<SkTypeface> (*gCreateTypefaceDelegate)(const char [], SkFontStyle )
; | 1270 extern sk_sp<SkTypeface> (*gCreateTypefaceDelegate)(const char [], SkFontStyle )
; |
1274 | 1271 |
1275 int dm_main(); | 1272 int dm_main(); |
1276 int dm_main() { | 1273 int dm_main() { |
1277 setbuf(stdout, nullptr); | 1274 setbuf(stdout, nullptr); |
1278 setup_crash_handler(); | 1275 setup_crash_handler(); |
1279 | 1276 |
1280 if (FLAGS_analyticAA) { | |
1281 GlobalAAConfig::getInstance().fUseAnalyticAA = true; | |
1282 } | |
1283 | |
1284 if (FLAGS_verbose) { | 1277 if (FLAGS_verbose) { |
1285 gVLog = stderr; | 1278 gVLog = stderr; |
1286 } else if (!FLAGS_writePath.isEmpty()) { | 1279 } else if (!FLAGS_writePath.isEmpty()) { |
1287 sk_mkdir(FLAGS_writePath[0]); | 1280 sk_mkdir(FLAGS_writePath[0]); |
1288 gVLog = fopen(SkOSPath::Join(FLAGS_writePath[0], "verbose.log").c_str(),
"w"); | 1281 gVLog = fopen(SkOSPath::Join(FLAGS_writePath[0], "verbose.log").c_str(),
"w"); |
1289 } | 1282 } |
1290 | 1283 |
1291 JsonWriter::DumpJson(); // It's handy for the bots to assume this is ~never
missing. | 1284 JsonWriter::DumpJson(); // It's handy for the bots to assume this is ~never
missing. |
1292 SkAutoGraphics ag; | 1285 SkAutoGraphics ag; |
1293 SkTaskGroup::Enabler enabled(FLAGS_threads); | 1286 SkTaskGroup::Enabler enabled(FLAGS_threads); |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1428 #endif | 1421 #endif |
1429 } | 1422 } |
1430 } // namespace skiatest | 1423 } // namespace skiatest |
1431 | 1424 |
1432 #if !defined(SK_BUILD_FOR_IOS) | 1425 #if !defined(SK_BUILD_FOR_IOS) |
1433 int main(int argc, char** argv) { | 1426 int main(int argc, char** argv) { |
1434 SkCommandLineFlags::Parse(argc, argv); | 1427 SkCommandLineFlags::Parse(argc, argv); |
1435 return dm_main(); | 1428 return dm_main(); |
1436 } | 1429 } |
1437 #endif | 1430 #endif |
OLD | NEW |