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" |
37 | 38 |
38 #ifdef SK_PDF_IMAGE_STATS | 39 #ifdef SK_PDF_IMAGE_STATS |
39 extern void SkPDFImageDumpStats(); | 40 extern void SkPDFImageDumpStats(); |
40 #endif | 41 #endif |
41 | 42 |
42 #include "png.h" | 43 #include "png.h" |
43 | 44 |
44 #include <stdlib.h> | 45 #include <stdlib.h> |
45 | 46 |
46 #ifndef SK_BUILD_FOR_WIN32 | 47 #ifndef SK_BUILD_FOR_WIN32 |
(...skipping 21 matching lines...) Expand all Loading... |
68 "File containing a list of uninteresting hashes. If a result hashes to s
omething in " | 69 "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."); | 70 "this list, no image is written for that result."); |
70 | 71 |
71 DEFINE_int32(shards, 1, "We're splitting source data into this many shards."); | 72 DEFINE_int32(shards, 1, "We're splitting source data into this many shards."); |
72 DEFINE_int32(shard, 0, "Which shard do I run?"); | 73 DEFINE_int32(shard, 0, "Which shard do I run?"); |
73 | 74 |
74 DEFINE_string(mskps, "", "Directory to read mskps from, or a single mskp file.")
; | 75 DEFINE_string(mskps, "", "Directory to read mskps from, or a single mskp file.")
; |
75 | 76 |
76 DEFINE_string(svgs, "", "Directory to read SVGs from, or a single SVG file."); | 77 DEFINE_string(svgs, "", "Directory to read SVGs from, or a single SVG file."); |
77 | 78 |
| 79 DEFINE_bool(analyticAA, false, "Analytic Anti-Alias"); |
| 80 |
78 using namespace DM; | 81 using namespace DM; |
79 using sk_gpu_test::GrContextFactory; | 82 using sk_gpu_test::GrContextFactory; |
80 using sk_gpu_test::GLTestContext; | 83 using sk_gpu_test::GLTestContext; |
81 using sk_gpu_test::ContextInfo; | 84 using sk_gpu_test::ContextInfo; |
82 | 85 |
83 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~*/ | 86 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~*/ |
84 | 87 |
85 static const double kStartMs = SkTime::GetMSecs(); | 88 static const double kStartMs = SkTime::GetMSecs(); |
86 | 89 |
87 static FILE* gVLog; | 90 static FILE* gVLog; |
(...skipping 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1281 | 1284 |
1282 #undef PORTABLE_FONT_PREFIX | 1285 #undef PORTABLE_FONT_PREFIX |
1283 | 1286 |
1284 extern sk_sp<SkTypeface> (*gCreateTypefaceDelegate)(const char [], SkFontStyle )
; | 1287 extern sk_sp<SkTypeface> (*gCreateTypefaceDelegate)(const char [], SkFontStyle )
; |
1285 | 1288 |
1286 int dm_main(); | 1289 int dm_main(); |
1287 int dm_main() { | 1290 int dm_main() { |
1288 setbuf(stdout, nullptr); | 1291 setbuf(stdout, nullptr); |
1289 setup_crash_handler(); | 1292 setup_crash_handler(); |
1290 | 1293 |
| 1294 if (FLAGS_analyticAA) { |
| 1295 GlobalAAConfig::getInstance().fUseAnalyticAA = true; |
| 1296 } |
| 1297 |
1291 if (FLAGS_verbose) { | 1298 if (FLAGS_verbose) { |
1292 gVLog = stderr; | 1299 gVLog = stderr; |
1293 } else if (!FLAGS_writePath.isEmpty()) { | 1300 } else if (!FLAGS_writePath.isEmpty()) { |
1294 sk_mkdir(FLAGS_writePath[0]); | 1301 sk_mkdir(FLAGS_writePath[0]); |
1295 gVLog = fopen(SkOSPath::Join(FLAGS_writePath[0], "verbose.log").c_str(),
"w"); | 1302 gVLog = fopen(SkOSPath::Join(FLAGS_writePath[0], "verbose.log").c_str(),
"w"); |
1296 } | 1303 } |
1297 | 1304 |
1298 JsonWriter::DumpJson(); // It's handy for the bots to assume this is ~never
missing. | 1305 JsonWriter::DumpJson(); // It's handy for the bots to assume this is ~never
missing. |
1299 SkAutoGraphics ag; | 1306 SkAutoGraphics ag; |
1300 SkTaskGroup::Enabler enabled(FLAGS_threads); | 1307 SkTaskGroup::Enabler enabled(FLAGS_threads); |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1435 #endif | 1442 #endif |
1436 } | 1443 } |
1437 } // namespace skiatest | 1444 } // namespace skiatest |
1438 | 1445 |
1439 #if !defined(SK_BUILD_FOR_IOS) | 1446 #if !defined(SK_BUILD_FOR_IOS) |
1440 int main(int argc, char** argv) { | 1447 int main(int argc, char** argv) { |
1441 SkCommandLineFlags::Parse(argc, argv); | 1448 SkCommandLineFlags::Parse(argc, argv); |
1442 return dm_main(); | 1449 return dm_main(); |
1443 } | 1450 } |
1444 #endif | 1451 #endif |
OLD | NEW |