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 "SkBenchmark.h" | 4 #include "SkBenchmark.h" |
5 #include "SkCommandLineFlags.h" | 5 #include "SkCommandLineFlags.h" |
6 #include "SkForceLinking.h" | 6 #include "SkForceLinking.h" |
7 #include "SkGraphics.h" | 7 #include "SkGraphics.h" |
8 #include "SkPicture.h" | 8 #include "SkPicture.h" |
9 #include "SkString.h" | 9 #include "SkString.h" |
10 #include "Test.h" | 10 #include "Test.h" |
11 #include "gm.h" | 11 #include "gm.h" |
| 12 #include "CrashHandler.h" |
12 | 13 |
13 #include "DMBenchTask.h" | 14 #include "DMBenchTask.h" |
14 #include "DMCpuGMTask.h" | 15 #include "DMCpuGMTask.h" |
15 #include "DMGpuGMTask.h" | 16 #include "DMGpuGMTask.h" |
16 #include "DMGpuSupport.h" | 17 #include "DMGpuSupport.h" |
17 #include "DMPDFTask.h" | 18 #include "DMPDFTask.h" |
18 #include "DMReporter.h" | 19 #include "DMReporter.h" |
19 #include "DMSKPTask.h" | 20 #include "DMSKPTask.h" |
20 #include "DMTask.h" | 21 #include "DMTask.h" |
21 #include "DMTaskRunner.h" | 22 #include "DMTaskRunner.h" |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 for (const Registry* reg = head; reg != NULL; reg = reg->next()) { | 215 for (const Registry* reg = head; reg != NULL; reg = reg->next()) { |
215 SkAutoTDelete<T> forName(reg->factory()(NULL)); | 216 SkAutoTDelete<T> forName(reg->factory()(NULL)); |
216 if (!SkCommandLineFlags::ShouldSkip(FLAGS_match, forName->getName())) { | 217 if (!SkCommandLineFlags::ShouldSkip(FLAGS_match, forName->getName())) { |
217 *out->append() = reg->factory(); | 218 *out->append() = reg->factory(); |
218 } | 219 } |
219 } | 220 } |
220 } | 221 } |
221 | 222 |
222 int tool_main(int argc, char** argv); | 223 int tool_main(int argc, char** argv); |
223 int tool_main(int argc, char** argv) { | 224 int tool_main(int argc, char** argv) { |
| 225 SetupCrashHandler(); |
224 SkAutoGraphics ag; | 226 SkAutoGraphics ag; |
225 SkCommandLineFlags::Parse(argc, argv); | 227 SkCommandLineFlags::Parse(argc, argv); |
226 | 228 |
227 if (FLAGS_dryRun) { | 229 if (FLAGS_dryRun) { |
228 FLAGS_verbose = true; | 230 FLAGS_verbose = true; |
229 } | 231 } |
230 #if SK_ENABLE_INST_COUNT | 232 #if SK_ENABLE_INST_COUNT |
231 gPrintInstCount = FLAGS_leaks; | 233 gPrintInstCount = FLAGS_leaks; |
232 #endif | 234 #endif |
233 GM::SetResourcePath(FLAGS_resources[0]); | 235 GM::SetResourcePath(FLAGS_resources[0]); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 reporter.getFailures(&failures); | 284 reporter.getFailures(&failures); |
283 report_failures(failures); | 285 report_failures(failures); |
284 return failures.count() > 0; | 286 return failures.count() > 0; |
285 } | 287 } |
286 | 288 |
287 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) | 289 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) |
288 int main(int argc, char** argv) { | 290 int main(int argc, char** argv) { |
289 return tool_main(argc, argv); | 291 return tool_main(argc, argv); |
290 } | 292 } |
291 #endif | 293 #endif |
OLD | NEW |