Bench baseline for mostly 0 image.

Add a baseline for decoding a mostly 0 image. This is in advance of
https://codereview.chromium.org/24269006/ which provides an option to
skip writing those 0s (as part of BUG=skia:1661). On my Nexus 4, the
benchmark does not slow down after that change.

As suggested in https://codereview.chromium.org/24269006/ add a
resourcePath flag to bench. Will require a change in buildbot in order
to actually use the flag.

Add an image used by the test.

Until https://codereview.chromium.org/24448002 is submitted,
the test will not actually be run by the bots (since it
won't know where to find the file).

BUG=skia:1661
R=djsollen@google.com, mtklein@google.com

Review URL: https://codereview.chromium.org/24440002

git-svn-id: http://skia.googlecode.com/svn/trunk@11461 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/bench/benchmain.cpp b/bench/benchmain.cpp
index 78993c1..57dfdd2 100644
--- a/bench/benchmain.cpp
+++ b/bench/benchmain.cpp
@@ -284,6 +284,7 @@
               "Ratio of subsequent bench measurements must drop within 1±error to converge.");
 DEFINE_string(timeFormat, "%9.2f", "Format to print results, in milliseconds per 1000 loops.");
 DEFINE_bool2(verbose, v, false, "Print more.");
+DEFINE_string2(resourcePath, i, NULL, "directory for test resources.");
 
 // Has this bench converged?  First arguments are milliseconds / loop iteration,
 // last is overall runtime in milliseconds.
@@ -357,6 +358,11 @@
             }
         }
     }
+    // Set the resource path.
+    if (!FLAGS_resourcePath.isEmpty()) {
+        SkBenchmark::SetResourcePath(FLAGS_resourcePath[0]);
+    }
+
 #if SK_SUPPORT_GPU
     for (int i = 0; i < configs.count(); ++i) {
         const Config& config = gConfigs[configs[i]];