Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: dm/DM.cpp

Issue 863723002: image subsetting as part of the name instead of a separate source type (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | dm/DMSrcSink.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | dm/DMSrcSink.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698