Index: dm/DM.cpp |
diff --git a/dm/DM.cpp b/dm/DM.cpp |
index c71450c23fd96681d0cd1a0a9f60486fc1ee0112..003145b92187a92743051a57bd1e5724612d5b2e 100644 |
--- a/dm/DM.cpp |
+++ b/dm/DM.cpp |
@@ -2,7 +2,7 @@ |
// For a high-level overview, please see dm/README. |
#include "CrashHandler.h" |
-#include "SkCommandLineFlags.h" |
+#include "SkCommonFlags.h" |
#include "SkForceLinking.h" |
#include "SkGraphics.h" |
#include "SkPicture.h" |
@@ -38,38 +38,17 @@ using skiatest::TestRegistry; |
static const char kGpuAPINameGL[] = "gl"; |
static const char kGpuAPINameGLES[] = "gles"; |
-DEFINE_int32(threads, -1, "Threads for CPU work. Default NUM_CPUS."); |
DEFINE_int32(gpuThreads, 1, "Threads for GPU work."); |
-DEFINE_string(gpuAPI, "", "Force use of specific gpu API. Using \"gl\" " |
- "forces OpenGL API. Using \"gles\" forces OpenGL ES API. " |
- "Defaults to empty string, which selects the API native to the " |
- "system."); |
DEFINE_string2(expectations, r, "", |
"If a directory, compare generated images against images under this path. " |
"If a file, compare generated images against JSON expectations at this path." |
); |
-DEFINE_string2(resources, i, "resources", "Path to resources directory."); |
-DEFINE_string(match, "", "[~][^]substring[$] [...] of GM name to run.\n" |
- "Multiple matches may be separated by spaces.\n" |
- "~ causes a matching GM to always be skipped\n" |
- "^ requires the start of the GM to match\n" |
- "$ requires the end of the GM to match\n" |
- "^ and $ requires an exact match\n" |
- "If a GM does not match any list entry,\n" |
- "it is skipped unless some list entry starts with ~"); |
-DEFINE_string(config, "565 8888 pdf gpu nonrendering", |
- "Options: 565 8888 pdf gpu nonrendering msaa4 msaa16 nvprmsaa4 nvprmsaa16 " |
- "gpunull gpudebug angle mesa"); |
-DEFINE_bool(dryRun, false, |
- "Just print the tests that would be run, without actually running them."); |
-DEFINE_bool(leaks, false, "Print leaked instance-counted objects at exit?"); |
+ |
DEFINE_string(skps, "", "Directory to read skps from."); |
DEFINE_bool(gms, true, "Run GMs?"); |
DEFINE_bool(tests, true, "Run tests?"); |
-DECLARE_bool(verbose); |
- |
__SK_FORCE_IMAGE_DECODER_LINKING; |
// "FooBar" -> "foobar". Obviously, ASCII only. |
@@ -203,11 +182,10 @@ static void append_matching_factories(Registry* head, SkTDArray<typename Registr |
} |
} |
-int tool_main(int argc, char** argv); |
-int tool_main(int argc, char** argv) { |
+int dm_main(); |
+int dm_main() { |
SetupCrashHandler(); |
SkAutoGraphics ag; |
- SkCommandLineFlags::Parse(argc, argv); |
if (FLAGS_dryRun) { |
FLAGS_verbose = true; |
@@ -262,6 +240,7 @@ int tool_main(int argc, char** argv) { |
#if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) |
int main(int argc, char** argv) { |
- return tool_main(argc, argv); |
+ SkCommandLineFlags::Parse(argc, argv); |
+ return dm_main(); |
} |
#endif |