Index: bench/benchmain.cpp |
=================================================================== |
--- bench/benchmain.cpp (revision 11291) |
+++ bench/benchmain.cpp (working copy) |
@@ -43,6 +43,8 @@ |
"normal", "deferred", "deferredSilent", "record", "picturerecord" |
}; |
+static const char kDefaultsConfigStr[] = "defaults"; |
+ |
/////////////////////////////////////////////////////////////////////////////// |
static void erase(SkBitmap& bm) { |
@@ -324,16 +326,19 @@ |
} |
SkTDArray<int> configs; |
+ bool runDefaultConfigs = false; |
// Try user-given configs first. |
for (int i = 0; i < FLAGS_config.count(); i++) { |
for (size_t j = 0; j < SK_ARRAY_COUNT(gConfigs); j++) { |
if (0 == strcmp(FLAGS_config[i], gConfigs[j].name)) { |
*configs.append() = j; |
+ } else if (0 == strcmp(FLAGS_config[i], kDefaultsConfigStr)) { |
mtklein
2013/09/16 18:02:59
This may seem like heresy, but I think "defaults"
borenet
2013/09/16 18:23:51
I kept it the same, since I added a reference in t
|
+ runDefaultConfigs = true; |
} |
} |
} |
// If there weren't any, fill in with defaults. |
- if (configs.count() == 0) { |
+ if (configs.count() == 0 || runDefaultConfigs) { |
mtklein
2013/09/16 18:02:59
If you change the default value of --config, I'd c
borenet
2013/09/16 18:23:51
Removing that condition causes no configs to be ru
|
for (size_t i = 0; i < SK_ARRAY_COUNT(gConfigs); ++i) { |
if (gConfigs[i].runByDefault) { |
*configs.append() = i; |