aboutsummaryrefslogtreecommitdiffstats
path: root/bench/benchmain.cpp
diff options
context:
space:
mode:
authorMike Reed <reed@google.com>2010-04-14 10:16:53 -0400
committerMike Reed <reed@google.com>2010-04-14 12:09:33 -0400
commit4c1037238c8ebcef8c75b5d43730ed308a11102c (patch)
treead54f6a51e559b4bec0f2a67cb4f5c46621fd97d /bench/benchmain.cpp
parent97c126db9982665ba3792f30ce7f74b854462c69 (diff)
downloadexternal_skia-4c1037238c8ebcef8c75b5d43730ed308a11102c.zip
external_skia-4c1037238c8ebcef8c75b5d43730ed308a11102c.tar.gz
external_skia-4c1037238c8ebcef8c75b5d43730ed308a11102c.tar.bz2
refresh from trunk
Change-Id: I0175ec7482f8cf85d25165da360a5352979fd7a0
Diffstat (limited to 'bench/benchmain.cpp')
-rw-r--r--bench/benchmain.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/bench/benchmain.cpp b/bench/benchmain.cpp
index 7443604..2f8b006 100644
--- a/bench/benchmain.cpp
+++ b/bench/benchmain.cpp
@@ -201,6 +201,8 @@ int main (int argc, char * const argv[]) {
bool doClip = false;
bool doPict = false;
const char* matchStr = NULL;
+ bool hasStrokeWidth = false;
+ float strokeWidth;
SkString outDir;
SkBitmap::Config outConfig = SkBitmap::kNo_Config;
@@ -260,6 +262,19 @@ int main (int argc, char * const argv[]) {
return -1;
}
forceAlpha = wantAlpha ? 0x80 : 0xFF;
+ } else if (strcmp(*argv, "-strokeWidth") == 0) {
+ argv++;
+ if (argv < stop) {
+ const char *strokeWidthStr = *argv;
+ if (sscanf(strokeWidthStr, "%f", &strokeWidth) != 1) {
+ log_error("bad arg for -strokeWidth\n");
+ return -1;
+ }
+ hasStrokeWidth = true;
+ } else {
+ log_error("missing arg for -strokeWidth\n");
+ return -1;
+ }
} else if (strcmp(*argv, "-match") == 0) {
argv++;
if (argv < stop) {
@@ -314,6 +329,9 @@ int main (int argc, char * const argv[]) {
bench->setForceAA(forceAA);
bench->setForceFilter(forceFilter);
bench->setDither(forceDither);
+ if (hasStrokeWidth) {
+ bench->setStrokeWidth(strokeWidth);
+ }
// only run benchmarks if their name contains matchStr
if (matchStr && strstr(bench->getName(), matchStr) == NULL) {