OLD | NEW |
1 #include "CrashHandler.h" | 1 #include "CrashHandler.h" |
2 #include "DMJsonWriter.h" | 2 #include "DMJsonWriter.h" |
3 #include "DMSrcSink.h" | 3 #include "DMSrcSink.h" |
4 #include "OverwriteLine.h" | 4 #include "OverwriteLine.h" |
5 #include "ProcStats.h" | 5 #include "ProcStats.h" |
6 #include "SkBBHFactory.h" | 6 #include "SkBBHFactory.h" |
7 #include "SkCommonFlags.h" | 7 #include "SkCommonFlags.h" |
8 #include "SkForceLinking.h" | 8 #include "SkForceLinking.h" |
9 #include "SkGraphics.h" | 9 #include "SkGraphics.h" |
10 #include "SkMD5.h" | 10 #include "SkMD5.h" |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 } | 437 } |
438 } | 438 } |
439 | 439 |
440 SK_COMPILE_ASSERT(kAnyThread_Enclave == 0, AnyThreadZero); | 440 SK_COMPILE_ASSERT(kAnyThread_Enclave == 0, AnyThreadZero); |
441 SkTaskGroup tg; | 441 SkTaskGroup tg; |
442 tg.batch( Task::Run, enclaves[0].begin(), enclaves[0].count()); | 442 tg.batch( Task::Run, enclaves[0].begin(), enclaves[0].count()); |
443 tg.batch(run_enclave, enclaves+1, kNumEnclaves-1); | 443 tg.batch(run_enclave, enclaves+1, kNumEnclaves-1); |
444 tg.batch( run_test, gCPUTests.begin(), gCPUTests.count()); | 444 tg.batch( run_test, gCPUTests.begin(), gCPUTests.count()); |
445 if (FLAGS_gpu_threading) { | 445 if (FLAGS_gpu_threading) { |
446 tg.batch(run_test, gGPUTests.begin(), gGPUTests.count()); | 446 tg.batch(run_test, gGPUTests.begin(), gGPUTests.count()); |
| 447 #if !defined(SK_BUILD_FOR_WIN32) |
447 } else { | 448 } else { |
448 for (int i = 0; i < gGPUTests.count(); i++) { | 449 for (int i = 0; i < gGPUTests.count(); i++) { |
449 run_test(&gGPUTests[i]); | 450 run_test(&gGPUTests[i]); |
450 } | 451 } |
| 452 #endif |
451 } | 453 } |
452 tg.wait(); | 454 tg.wait(); |
| 455 // At this point we're back in single-threaded land. |
453 | 456 |
454 // At this point we're back in single-threaded land. | 457 // This is not ideal for parallelism, but Windows seems crash-prone if we ru
n |
| 458 // these GPU tests in parallel with any GPU Src/Sink work. Everyone else se
ems fine. |
| 459 #if defined(SK_BUILD_FOR_WIN32) |
| 460 for (int i = 0; i < gGPUTests.count(); i++) { |
| 461 run_test(&gGPUTests[i]); |
| 462 } |
| 463 #endif |
| 464 |
455 SkDebugf("\n"); | 465 SkDebugf("\n"); |
456 | |
457 JsonWriter::DumpJson(); | 466 JsonWriter::DumpJson(); |
458 | 467 |
459 if (gFailures.count() > 0) { | 468 if (gFailures.count() > 0) { |
460 SkDebugf("Failures:\n"); | 469 SkDebugf("Failures:\n"); |
461 for (int i = 0; i < gFailures.count(); i++) { | 470 for (int i = 0; i < gFailures.count(); i++) { |
462 SkDebugf("\t%s", gFailures[i].c_str()); | 471 SkDebugf("\t%s", gFailures[i].c_str()); |
463 } | 472 } |
464 SkDebugf("%d failures\n", gFailures.count()); | 473 SkDebugf("%d failures\n", gFailures.count()); |
465 return 1; | 474 return 1; |
466 } | 475 } |
467 if (gPending > 0) { | 476 if (gPending > 0) { |
468 SkDebugf("Hrm, we didn't seem to run everything we intended to! Please
file a bug.\n"); | 477 SkDebugf("Hrm, we didn't seem to run everything we intended to! Please
file a bug.\n"); |
469 return 1; | 478 return 1; |
470 } | 479 } |
471 return 0; | 480 return 0; |
472 } | 481 } |
473 | 482 |
474 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) | 483 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) |
475 int main(int argc, char** argv) { | 484 int main(int argc, char** argv) { |
476 SkCommandLineFlags::Parse(argc, argv); | 485 SkCommandLineFlags::Parse(argc, argv); |
477 return dm_main(); | 486 return dm_main(); |
478 } | 487 } |
479 #endif | 488 #endif |
OLD | NEW |