OLD | NEW |
1 // Main binary for DM. | 1 // Main binary for DM. |
2 // For a high-level overview, please see dm/README. | 2 // For a high-level overview, please see dm/README. |
3 | 3 |
4 #include "CrashHandler.h" | 4 #include "CrashHandler.h" |
5 #include "LazyDecodeBitmap.h" | 5 #include "LazyDecodeBitmap.h" |
6 #include "SkCommonFlags.h" | 6 #include "SkCommonFlags.h" |
7 #include "SkForceLinking.h" | 7 #include "SkForceLinking.h" |
8 #include "SkGraphics.h" | 8 #include "SkGraphics.h" |
9 #include "SkOSFile.h" | 9 #include "SkOSFile.h" |
10 #include "SkPicture.h" | 10 #include "SkPicture.h" |
11 #include "SkString.h" | 11 #include "SkString.h" |
12 #include "SkTaskGroup.h" | 12 #include "SkTaskGroup.h" |
13 #include "Test.h" | 13 #include "Test.h" |
14 #include "gm.h" | 14 #include "gm.h" |
15 #include "sk_tool_utils.h" | 15 #include "sk_tool_utils.h" |
16 #include "sk_tool_utils_flags.h" | 16 #include "sk_tool_utils_flags.h" |
17 | 17 |
18 #include "DMCpuGMTask.h" | 18 #include "DMCpuGMTask.h" |
19 #include "DMGpuGMTask.h" | 19 #include "DMGpuGMTask.h" |
20 #include "DMGpuSupport.h" | 20 #include "DMGpuSupport.h" |
| 21 #include "DMJsonWriter.h" |
21 #include "DMPDFTask.h" | 22 #include "DMPDFTask.h" |
22 #include "DMReporter.h" | 23 #include "DMReporter.h" |
23 #include "DMSKPTask.h" | 24 #include "DMSKPTask.h" |
24 #include "DMTask.h" | 25 #include "DMTask.h" |
25 #include "DMTaskRunner.h" | 26 #include "DMTaskRunner.h" |
26 #include "DMTestTask.h" | 27 #include "DMTestTask.h" |
27 #include "DMWriteTask.h" | |
28 | 28 |
29 #ifdef SK_BUILD_POPPLER | 29 #ifdef SK_BUILD_POPPLER |
30 # include "SkPDFRasterizer.h" | 30 # include "SkPDFRasterizer.h" |
31 # define RASTERIZE_PDF_PROC SkPopplerRasterizePDF | 31 # define RASTERIZE_PDF_PROC SkPopplerRasterizePDF |
32 #elif defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS) | 32 #elif defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS) |
33 # include "SkCGUtils.h" | 33 # include "SkCGUtils.h" |
34 # define RASTERIZE_PDF_PROC SkPDFDocumentToBitmap | 34 # define RASTERIZE_PDF_PROC SkPDFDocumentToBitmap |
35 #else | 35 #else |
36 # define RASTERIZE_PDF_PROC NULL | 36 # define RASTERIZE_PDF_PROC NULL |
37 #endif | 37 #endif |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 SkDebugf("%d GMs x %d configs, %d tests, %d pictures\n", | 222 SkDebugf("%d GMs x %d configs, %d tests, %d pictures\n", |
223 gms.count(), configs.count(), tests.count(), skps.count()); | 223 gms.count(), configs.count(), tests.count(), skps.count()); |
224 DM::Reporter reporter; | 224 DM::Reporter reporter; |
225 | 225 |
226 DM::TaskRunner tasks; | 226 DM::TaskRunner tasks; |
227 kick_off_tests(tests, &reporter, &tasks); | 227 kick_off_tests(tests, &reporter, &tasks); |
228 kick_off_gms(gms, configs, gpuAPI, &reporter, &tasks); | 228 kick_off_gms(gms, configs, gpuAPI, &reporter, &tasks); |
229 kick_off_skps(skps, &reporter, &tasks); | 229 kick_off_skps(skps, &reporter, &tasks); |
230 tasks.wait(); | 230 tasks.wait(); |
231 | 231 |
232 DM::WriteTask::DumpJson(); | 232 DM::JsonWriter::DumpJson(); |
233 | 233 |
234 SkDebugf("\n"); | 234 SkDebugf("\n"); |
235 #ifdef SK_DEBUG | 235 #ifdef SK_DEBUG |
236 if (FLAGS_portableFonts && FLAGS_reportUsedChars) { | 236 if (FLAGS_portableFonts && FLAGS_reportUsedChars) { |
237 sk_tool_utils::report_used_chars(); | 237 sk_tool_utils::report_used_chars(); |
238 } | 238 } |
239 #endif | 239 #endif |
240 | 240 |
241 SkTArray<SkString> failures; | 241 SkTArray<SkString> failures; |
242 reporter.getFailures(&failures); | 242 reporter.getFailures(&failures); |
243 report_failures(failures); | 243 report_failures(failures); |
244 return failures.count() > 0; | 244 return failures.count() > 0; |
245 } | 245 } |
246 | 246 |
247 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) | 247 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) |
248 int main(int argc, char** argv) { | 248 int main(int argc, char** argv) { |
249 SkCommandLineFlags::Parse(argc, argv); | 249 SkCommandLineFlags::Parse(argc, argv); |
250 return dm_main(); | 250 return dm_main(); |
251 } | 251 } |
252 #endif | 252 #endif |
OLD | NEW |