| 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" |
| 11 #include "SkOSFile.h" | 11 #include "SkOSFile.h" |
| 12 #include "SkTaskGroup.h" | 12 #include "SkTaskGroup.h" |
| 13 #include "Test.h" | 13 #include "Test.h" |
| 14 #include "Timer.h" | 14 #include "Timer.h" |
| 15 | 15 |
| 16 DEFINE_bool(tests, true, "Run tests?"); | 16 DEFINE_bool(tests, true, "Run tests?"); |
| 17 DEFINE_string(images, "resources", "Images to decode."); | 17 DEFINE_string(images, "resources", "Images to decode."); |
| 18 DEFINE_string(src, "gm skp image subset", "Source types to test."); | 18 DEFINE_string(src, "gm skp image", "Source types to test."); |
| 19 DEFINE_bool(nameByHash, false, | 19 DEFINE_bool(nameByHash, false, |
| 20 "If true, write to FLAGS_writePath[0]/<hash>.png instead of " | 20 "If true, write to FLAGS_writePath[0]/<hash>.png instead of " |
| 21 "to FLAGS_writePath[0]/<config>/<sourceType>/<name>.png"); | 21 "to FLAGS_writePath[0]/<config>/<sourceType>/<name>.png"); |
| 22 DEFINE_bool2(pathOpsExtended, x, false, "Run extended pathOps tests."); | 22 DEFINE_bool2(pathOpsExtended, x, false, "Run extended pathOps tests."); |
| 23 DEFINE_string(matrix, "1 0 0 0 1 0 0 0 1", | 23 DEFINE_string(matrix, "1 0 0 0 1 0 0 0 1", |
| 24 "Matrix to apply when using 'matrix' in config."); | 24 "Matrix to apply when using 'matrix' in config."); |
| 25 DEFINE_bool(gpu_threading, false, "Allow GPU work to run on multiple threads?"); | 25 DEFINE_bool(gpu_threading, false, "Allow GPU work to run on multiple threads?"); |
| 26 | 26 |
| 27 DEFINE_string(blacklist, "", | 27 DEFINE_string(blacklist, "", |
| 28 "Space-separated config/src/name triples to blacklist. '_' matches anyt
hing. E.g. \n" | 28 "Space-separated config/src/name triples to blacklist. '_' matches anyt
hing. E.g. \n" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 } | 88 } |
| 89 if (!FLAGS_images.isEmpty()) { | 89 if (!FLAGS_images.isEmpty()) { |
| 90 const char* exts[] = { | 90 const char* exts[] = { |
| 91 "bmp", "gif", "jpg", "jpeg", "png", "webp", "ktx", "astc", "wbmp", "
ico", | 91 "bmp", "gif", "jpg", "jpeg", "png", "webp", "ktx", "astc", "wbmp", "
ico", |
| 92 "BMP", "GIF", "JPG", "JPEG", "PNG", "WEBP", "KTX", "ASTC", "WBMP", "
ICO", | 92 "BMP", "GIF", "JPG", "JPEG", "PNG", "WEBP", "KTX", "ASTC", "WBMP", "
ICO", |
| 93 }; | 93 }; |
| 94 for (size_t i = 0; i < SK_ARRAY_COUNT(exts); i++) { | 94 for (size_t i = 0; i < SK_ARRAY_COUNT(exts); i++) { |
| 95 SkOSFile::Iter it(FLAGS_images[0], exts[i]); | 95 SkOSFile::Iter it(FLAGS_images[0], exts[i]); |
| 96 for (SkString file; it.next(&file); ) { | 96 for (SkString file; it.next(&file); ) { |
| 97 SkString path = SkOSPath::Join(FLAGS_images[0], file.c_str()); | 97 SkString path = SkOSPath::Join(FLAGS_images[0], file.c_str()); |
| 98 push_src("image", new ImageSrc(path)); // Decode entire ima
ge. | 98 push_src("image", new ImageSrc(path)); // Decode entire imag
e. |
| 99 push_src("subset", new ImageSrc(path, 5)); // Decode 5 random s
ubsets. | 99 push_src("image", new ImageSrc(path, 5)); // Decode 5 random su
bsets. |
| 100 } | 100 } |
| 101 } | 101 } |
| 102 } | 102 } |
| 103 } | 103 } |
| 104 | 104 |
| 105 static GrGLStandard get_gpu_api() { | 105 static GrGLStandard get_gpu_api() { |
| 106 if (FLAGS_gpuAPI.contains("gl")) { return kGL_GrGLStandard; } | 106 if (FLAGS_gpuAPI.contains("gl")) { return kGL_GrGLStandard; } |
| 107 if (FLAGS_gpuAPI.contains("gles")) { return kGLES_GrGLStandard; } | 107 if (FLAGS_gpuAPI.contains("gles")) { return kGLES_GrGLStandard; } |
| 108 return kNone_GrGLStandard; | 108 return kNone_GrGLStandard; |
| 109 } | 109 } |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 } | 478 } |
| 479 return 0; | 479 return 0; |
| 480 } | 480 } |
| 481 | 481 |
| 482 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) | 482 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) |
| 483 int main(int argc, char** argv) { | 483 int main(int argc, char** argv) { |
| 484 SkCommandLineFlags::Parse(argc, argv); | 484 SkCommandLineFlags::Parse(argc, argv); |
| 485 return dm_main(); | 485 return dm_main(); |
| 486 } | 486 } |
| 487 #endif | 487 #endif |
| OLD | NEW |