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

Unified Diff: bench/benchmain.cpp

Issue 23855006: Allow use of "--config defaults" in bench, like GM (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« 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