diff options
author | 2015-04-27 06:41:35 -0700 | |
---|---|---|
committer | 2015-04-27 06:41:36 -0700 | |
commit | 275231474528cbe42cb49b7e649fbbd6b92890af (patch) | |
tree | e68be04c8476cf9936cdcda584fc2e5566ca75fc /tools | |
parent | 6a307bacc8037a0745bb0efa8b00143c7c4320a8 (diff) |
dm||nanobench --help looks nice when $COLUMNS == 80.
Also, add to --config help message
Review URL: https://codereview.chromium.org/1105593002
Diffstat (limited to 'tools')
-rw-r--r-- | tools/flags/SkCommandLineFlags.cpp | 12 | ||||
-rw-r--r-- | tools/flags/SkCommonFlags.cpp | 7 |
2 files changed, 10 insertions, 9 deletions
diff --git a/tools/flags/SkCommandLineFlags.cpp b/tools/flags/SkCommandLineFlags.cpp index 8929c38375..719e1634e4 100644 --- a/tools/flags/SkCommandLineFlags.cpp +++ b/tools/flags/SkCommandLineFlags.cpp @@ -140,10 +140,10 @@ void SkCommandLineFlags::SetUsage(const char* usage) { } // Maximum line length for the help message. -#define LINE_LENGTH 80 +#define LINE_LENGTH 72 static void print_help_for_flag(const SkFlagInfo* flag) { - SkDebugf("\t--%s", flag->name().c_str()); + SkDebugf(" --%s", flag->name().c_str()); const SkString& shortName = flag->shortName(); if (shortName.size() > 0) { SkDebugf(" or -%s", shortName.c_str()); @@ -160,7 +160,7 @@ static void print_help_for_flag(const SkFlagInfo* flag) { while (currLine < stop) { if (strlen(currLine) < LINE_LENGTH) { // Only one line length's worth of text left. - SkDebugf("\t\t%s\n", currLine); + SkDebugf(" %s\n", currLine); break; } int lineBreak = SkStrFind(currLine, "\n"); @@ -180,12 +180,12 @@ static void print_help_for_flag(const SkFlagInfo* flag) { // Skip the space on the next line gap = 1; } - SkDebugf("\t\t%.*s\n", spaceIndex, currLine); + SkDebugf(" %.*s\n", spaceIndex, currLine); currLine += spaceIndex + gap; } else { // the line break is within the limit. Break there. lineBreak++; - SkDebugf("\t\t%.*s", lineBreak, currLine); + SkDebugf(" %.*s", lineBreak, currLine); currLine += lineBreak; } } @@ -256,7 +256,7 @@ void SkCommandLineFlags::Parse(int argc, char** argv) { if (helpFlags.count() > 0) { SkDebugf("Requested help for unrecognized flags:\n"); for (int k = 0; k < helpFlags.count(); k++) { - SkDebugf("\t--%s\n", helpFlags[k]); + SkDebugf(" --%s\n", helpFlags[k]); } } helpPrinted = true; diff --git a/tools/flags/SkCommonFlags.cpp b/tools/flags/SkCommonFlags.cpp index ed7d5ccf5c..1a9018bec1 100644 --- a/tools/flags/SkCommonFlags.cpp +++ b/tools/flags/SkCommonFlags.cpp @@ -7,9 +7,10 @@ #include "SkCommonFlags.h" -DEFINE_string(config, "565 8888 gpu nonrendering angle hwui ", - "Options: 565 8888 pdf gpu nonrendering msaa4 msaa16 nvprmsaa4 nvprmsaa16 " - "gpudft gpunull gpudebug angle mesa (and many more)"); +DEFINE_string(config, "565 8888 gpu nonrendering angle hwui ", "Options: " + "565 8888 angle debug gpu gpudebug gpudft gpunull hwui mesa " + "msaa16 msaa4 nonrendering null nullgpu nvprmsaa16 nvprmsaa4 " + "pdf skp svg xps (and maybe more)"); DEFINE_bool(cpu, true, "master switch for running CPU-bound work."); |