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

Unified Diff: gm/gmmain.cpp

Issue 12955002: Correction for gm --config usage text (default configs). (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/gmmain.cpp
===================================================================
--- gm/gmmain.cpp (revision 8254)
+++ gm/gmmain.cpp (working copy)
@@ -990,7 +990,7 @@
{ SkBitmap::kARGB_8888_Config, kGPU_Backend, GrContextFactory::kNative_GLContextType, 16, kRW_ConfigFlag, "msaa16", true },
{ SkBitmap::kARGB_8888_Config, kGPU_Backend, GrContextFactory::kNative_GLContextType, 4, kRW_ConfigFlag, "msaa4", false},
/* The debug context does not generate images */
- { SkBitmap::kARGB_8888_Config, kGPU_Backend, GrContextFactory::kDebug_GLContextType, 0, kNone_ConfigFlag, "debug", true },
+ { SkBitmap::kARGB_8888_Config, kGPU_Backend, GrContextFactory::kDebug_GLContextType, 0, kNone_ConfigFlag, "gpudebug", GR_DEBUG},
#if SK_ANGLE
{ SkBitmap::kARGB_8888_Config, kGPU_Backend, GrContextFactory::kANGLE_GLContextType, 0, kRW_ConfigFlag, "angle", true },
{ SkBitmap::kARGB_8888_Config, kGPU_Backend, GrContextFactory::kANGLE_GLContextType, 16, kRW_ConfigFlag, "anglemsaa16", true },
@@ -1008,22 +1008,33 @@
#endif // SK_SUPPORT_PDF
};
-static SkString configUsage() {
- SkString result("Possible options for --config: [");
+static SkString configUsage(const char* perLinePrefix) {
+ SkString result;
+ result.appendf("%sPossible options for --config: [", perLinePrefix);
for (size_t i = 0; i < SK_ARRAY_COUNT(gRec); ++i) {
if (i > 0) {
- result.appendf("|");
+ result.append("|");
}
result.appendf("%s", gRec[i].fName);
}
- result.appendf("]");
+ result.append("]\n");
+ result.appendf("%sThe default value is: \"", perLinePrefix);
+ for (size_t i = 0; i < SK_ARRAY_COUNT(gRec); ++i) {
+ if (gRec[i].fRunByDefault) {
+ if (i > 0) {
+ result.append(" ");
+ }
+ result.appendf("%s", gRec[i].fName);
+ }
+ }
+ result.appendf("\"");
+
return result;
}
// Alphabetized ignoring "no" prefix ("readPath", "noreplay", "resourcePath").
DEFINE_string(config, "", "Space delimited list of which configs to run. "
- "Possible configs listed above. If none are specified, "
- "all will be run.");
+ "Possible configs listed above as well as the default set.");
DEFINE_bool(deferred, true, "Exercise the deferred rendering test pass.");
DEFINE_bool(enableMissingWarning, true, "Print message to stderr (but don't fail) if "
"unable to read a reference image for any tests.");
@@ -1151,7 +1162,7 @@
bool userConfig = false;
SkString usage;
- usage.printf("Run the golden master tests.\n\t%s", configUsage().c_str());
+ usage.printf("Run the golden master tests.\n%s", configUsage("\t").c_str());
SkFlags::SetUsage(usage.c_str());
SkFlags::ParseCommandLine(argc, argv);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698