Similar in spirit to gflags' undefok, I'd like to be able to ignore
specific unknown flags. This lets me run the same command line on, say,
a branch that's got a new flag and on a clean branch tracking
origin/master. This is handy for performance comparison, etc.
It's not essential, and if you hate this I can find another way.
As an example, I want to compare the runtime of SKP recording with my new code. I've added a flag --skr to bench_record to help this. So I want to compare
origin/master: out/Release/bench_record
my patch: out/Release/bench_record --skr
This lets me run both as out/Release/bench_record --undefok skr --skr, which is handy for scripts and things.
BUG=skia:
R=scroggo@google.com, mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/209393015
git-svn-id: http://skia.googlecode.com/svn/trunk@13945 2bbb7eff-a529-9590-31e7-b0007b416f81
In SkCommandLineFlags, if the client sets a default value
of multiple arguments (e.g. "arg0 arg1 ..."), set
the actual defaults to all of those arguments separately
(i.e. an array with [0] == "arg0", [1] == "arg1", ...),
rather than as one string (i.e. [0] == "arg0 arg1 ...").
Remove the hack that worked around this bug.
Also move the increasingly complicated implementation of
SkFlagInfo::CreateStringFlag into the cpp file.
BUG=https://code.google.com/p/skia/issues/detail?id=1237
Review URL: https://codereview.chromium.org/14366034
git-svn-id: http://skia.googlecode.com/svn/trunk@8845 2bbb7eff-a529-9590-31e7-b0007b416f81
Two dashes are used for flags with multiple characters, and one
dash is used for flags with single characters.
In GM, changed '-wp' to '-p' (the command to choose a directory
for writing SKPs) to fit with the convention.
In render_pictures and bench_pictures, changed the flag for
read and write path to have full names (which are consistent)
and use the old single character names as their shortcuts.
SkCommandLineFlags: Updated the documentation, and only allow
-h or --help for help (again, to match the convention).
Also enforce the single character limit for the short name, and
require the full name to be at least two characters.
Provide full names for skhello.
BUG=https://code.google.com/p/skia/issues/detail?id=1174
Review URL: https://codereview.chromium.org/12521019
git-svn-id: http://skia.googlecode.com/svn/trunk@8582 2bbb7eff-a529-9590-31e7-b0007b416f81