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 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1280 | 1283 |
1281 #undef PORTABLE_FONT_PREFIX | 1284 #undef PORTABLE_FONT_PREFIX |
1282 | 1285 |
1283 extern sk_sp<SkTypeface> (*gCreateTypefaceDelegate)(const char [], SkFontStyle )
; | 1286 extern sk_sp<SkTypeface> (*gCreateTypefaceDelegate)(const char [], SkFontStyle )
; |
1284 | 1287 |
1285 int dm_main(); | 1288 int dm_main(); |
1286 int dm_main() { | 1289 int dm_main() { |
1287 setbuf(stdout, nullptr); | 1290 setbuf(stdout, nullptr); |
1288 setup_crash_handler(); | 1291 setup_crash_handler(); |
1289 | 1292 |
| 1293 if (FLAGS_analyticAA) { |
| 1294 GlobalAAConfig::getInstance().fUseAnalyticAA = true; |
| 1295 } |
| 1296 |
1290 if (FLAGS_verbose) { | 1297 if (FLAGS_verbose) { |
1291 gVLog = stderr; | 1298 gVLog = stderr; |
1292 } else if (!FLAGS_writePath.isEmpty()) { | 1299 } else if (!FLAGS_writePath.isEmpty()) { |
1293 sk_mkdir(FLAGS_writePath[0]); | 1300 sk_mkdir(FLAGS_writePath[0]); |
1294 gVLog = fopen(SkOSPath::Join(FLAGS_writePath[0], "verbose.log").c_str(),
"w"); | 1301 gVLog = fopen(SkOSPath::Join(FLAGS_writePath[0], "verbose.log").c_str(),
"w"); |
1295 } | 1302 } |
1296 | 1303 |
1297 JsonWriter::DumpJson(); // It's handy for the bots to assume this is ~never
missing. | 1304 JsonWriter::DumpJson(); // It's handy for the bots to assume this is ~never
missing. |
1298 SkAutoGraphics ag; | 1305 SkAutoGraphics ag; |
1299 SkTaskGroup::Enabler enabled(FLAGS_threads); | 1306 SkTaskGroup::Enabler enabled(FLAGS_threads); |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1434 #endif | 1441 #endif |
1435 } | 1442 } |
1436 } // namespace skiatest | 1443 } // namespace skiatest |
1437 | 1444 |
1438 #if !defined(SK_BUILD_FOR_IOS) | 1445 #if !defined(SK_BUILD_FOR_IOS) |
1439 int main(int argc, char** argv) { | 1446 int main(int argc, char** argv) { |
1440 SkCommandLineFlags::Parse(argc, argv); | 1447 SkCommandLineFlags::Parse(argc, argv); |
1441 return dm_main(); | 1448 return dm_main(); |
1442 } | 1449 } |
1443 #endif | 1450 #endif |
OLD | NEW |