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

Unified Diff: tools/flags/SkCommonFlagsConfig.cpp

Issue 2378163003: Use brackets for explicit GPU config params in tools (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/TestConfigParsing.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/flags/SkCommonFlagsConfig.cpp
diff --git a/tools/flags/SkCommonFlagsConfig.cpp b/tools/flags/SkCommonFlagsConfig.cpp
index 74db3ee833fd8d45fe65407fee7b1ad201bf6d3b..14084ce0e0f7d07eab46c0396c751dad4279d25d 100644
--- a/tools/flags/SkCommonFlagsConfig.cpp
+++ b/tools/flags/SkCommonFlagsConfig.cpp
@@ -96,7 +96,7 @@ static const char* config_help_fn() {
for (const auto& config : gPredefinedConfigs) {
helpString.appendf(" %s", config.predefinedConfig);
}
- helpString.append(" or use extended form 'backend(option=value,...)'.\n");
+ helpString.append(" or use extended form 'backend[option=value,...]'.\n");
return helpString.c_str();
}
@@ -105,7 +105,7 @@ static const char configExtendedHelp[] =
"Possible backends and options:\n"
#if SK_SUPPORT_GPU
"\n"
- "gpu(api=string,color=string,dit=bool,nvpr=bool,inst=bool,samples=int)\n"
+ "gpu[api=string,color=string,dit=bool,nvpr=bool,inst=bool,samples=int]\n"
"\tapi\ttype: string\tdefault: native.\n"
"\t Select graphics API to use with gpu backend.\n"
"\t Options:\n"
@@ -382,10 +382,10 @@ void ParseConfigs(const SkCommandLineFlags::StringArray& configs,
SkString tag(configs[i]);
SkTArray<SkString> parts;
- SkStrSplit(tag.c_str(), "(", kStrict_SkStrSplitMode, &parts);
+ SkStrSplit(tag.c_str(), "[", kStrict_SkStrSplitMode, &parts);
if (parts.count() == 2) {
SkTArray<SkString> parts2;
- SkStrSplit(parts[1].c_str(), ")", kStrict_SkStrSplitMode, &parts2);
+ SkStrSplit(parts[1].c_str(), "]", kStrict_SkStrSplitMode, &parts2);
if (parts2.count() == 2 && parts2[1].isEmpty()) {
SkStrSplit(parts[0].c_str(), "-", kStrict_SkStrSplitMode, &vias);
if (vias.count()) {
@@ -395,7 +395,7 @@ void ParseConfigs(const SkCommandLineFlags::StringArray& configs,
extendedBackend = parts[0];
}
extendedOptions = parts2[0];
- simpleBackend.printf("%s(%s)", extendedBackend.c_str(), extendedOptions.c_str());
+ simpleBackend.printf("%s[%s]", extendedBackend.c_str(), extendedOptions.c_str());
}
}
« no previous file with comments | « tests/TestConfigParsing.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698