| 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 "SkChecksum.h" | 7 #include "SkChecksum.h" |
| 8 #include "SkCommonFlags.h" | 8 #include "SkCommonFlags.h" |
| 9 #include "SkForceLinking.h" | 9 #include "SkForceLinking.h" |
| 10 #include "SkGraphics.h" | 10 #include "SkGraphics.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 push_src("gm", new GMSrc(r->factory())); | 123 push_src("gm", new GMSrc(r->factory())); |
| 124 } | 124 } |
| 125 for (int i = 0; i < FLAGS_skps.count(); i++) { | 125 for (int i = 0; i < FLAGS_skps.count(); i++) { |
| 126 const char* path = FLAGS_skps[i]; | 126 const char* path = FLAGS_skps[i]; |
| 127 if (sk_isdir(path)) { | 127 if (sk_isdir(path)) { |
| 128 SkOSFile::Iter it(path, "skp"); | 128 SkOSFile::Iter it(path, "skp"); |
| 129 for (SkString file; it.next(&file); ) { | 129 for (SkString file; it.next(&file); ) { |
| 130 push_src("skp", new SKPSrc(SkOSPath::Join(path, file.c_str()))); | 130 push_src("skp", new SKPSrc(SkOSPath::Join(path, file.c_str()))); |
| 131 } | 131 } |
| 132 } else { | 132 } else { |
| 133 push_src("skp", new SKPSrc(SkString(path))); | 133 push_src("skp", new SKPSrc(path)); |
| 134 } | 134 } |
| 135 } | 135 } |
| 136 static const char* const exts[] = { | 136 static const char* const exts[] = { |
| 137 "bmp", "gif", "jpg", "jpeg", "png", "webp", "ktx", "astc", "wbmp", "ico"
, | 137 "bmp", "gif", "jpg", "jpeg", "png", "webp", "ktx", "astc", "wbmp", "ico"
, |
| 138 "BMP", "GIF", "JPG", "JPEG", "PNG", "WEBP", "KTX", "ASTC", "WBMP", "ICO"
, | 138 "BMP", "GIF", "JPG", "JPEG", "PNG", "WEBP", "KTX", "ASTC", "WBMP", "ICO"
, |
| 139 }; | 139 }; |
| 140 for (int i = 0; i < FLAGS_images.count(); i++) { | 140 for (int i = 0; i < FLAGS_images.count(); i++) { |
| 141 const char* flag = FLAGS_images[i]; | 141 const char* flag = FLAGS_images[i]; |
| 142 if (sk_isdir(flag)) { | 142 if (sk_isdir(flag)) { |
| 143 for (size_t j = 0; j < SK_ARRAY_COUNT(exts); j++) { | 143 for (size_t j = 0; j < SK_ARRAY_COUNT(exts); j++) { |
| 144 SkOSFile::Iter it(flag, exts[j]); | 144 SkOSFile::Iter it(flag, exts[j]); |
| 145 for (SkString file; it.next(&file); ) { | 145 for (SkString file; it.next(&file); ) { |
| 146 SkString path = SkOSPath::Join(flag, file.c_str()); | 146 SkString path = SkOSPath::Join(flag, file.c_str()); |
| 147 push_src("image", new ImageSrc(path)); // Decode entire
image. | 147 push_src("image", new ImageSrc(path)); // Decode entire
image. |
| 148 push_src("image", new ImageSrc(path, 5)); // Decode 5 rando
m subsets. | 148 push_src("image", new ImageSrc(path, 5)); // Decode 5 rando
m subsets. |
| 149 } | 149 } |
| 150 } | 150 } |
| 151 } else if (sk_exists(flag)) { | 151 } else if (sk_exists(flag)) { |
| 152 // assume that FLAGS_images[i] is a valid image if it is a file. | 152 // assume that FLAGS_images[i] is a valid image if it is a file. |
| 153 push_src("image", new ImageSrc(SkString(flag))); // Decode entir
e image. | 153 push_src("image", new ImageSrc(flag)); // Decode entire image. |
| 154 push_src("image", new ImageSrc(SkString(flag), 5)); // Decode 5 ran
dom subsets. | 154 push_src("image", new ImageSrc(flag, 5)); // Decode 5 random subset
s. |
| 155 } | 155 } |
| 156 } | 156 } |
| 157 } | 157 } |
| 158 | 158 |
| 159 static GrGLStandard get_gpu_api() { | 159 static GrGLStandard get_gpu_api() { |
| 160 if (FLAGS_gpuAPI.contains("gl")) { return kGL_GrGLStandard; } | 160 if (FLAGS_gpuAPI.contains("gl")) { return kGL_GrGLStandard; } |
| 161 if (FLAGS_gpuAPI.contains("gles")) { return kGLES_GrGLStandard; } | 161 if (FLAGS_gpuAPI.contains("gles")) { return kGLES_GrGLStandard; } |
| 162 return kNone_GrGLStandard; | 162 return kNone_GrGLStandard; |
| 163 } | 163 } |
| 164 | 164 |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 } | 544 } |
| 545 return 0; | 545 return 0; |
| 546 } | 546 } |
| 547 | 547 |
| 548 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) | 548 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) |
| 549 int main(int argc, char** argv) { | 549 int main(int argc, char** argv) { |
| 550 SkCommandLineFlags::Parse(argc, argv); | 550 SkCommandLineFlags::Parse(argc, argv); |
| 551 return dm_main(); | 551 return dm_main(); |
| 552 } | 552 } |
| 553 #endif | 553 #endif |
| OLD | NEW |