Add --gpuThreads support to skpbench.py (take 2)

Change-Id: Ie946ff339c4e04bb866545ad60c2ab77bae85417
Reviewed-on: https://skia-review.googlesource.com/136175
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/tools/skpbench/skpbench.py b/tools/skpbench/skpbench.py
index a9ec618..0477db2 100755
--- a/tools/skpbench/skpbench.py
+++ b/tools/skpbench/skpbench.py
@@ -75,6 +75,10 @@
   type=int, default=0, help="number of tiles along one edge when in DDL mode")
 __argparse.add_argument('--ddlRecordTime',
   action='store_true', help="report just the cpu time spent recording DDLs")
+__argparse.add_argument('--gpuThreads',
+  type=int, default=-1,
+  help="Create this many extra threads to assist with GPU work, including"
+       " software path rendering. Defaults to two.")
 __argparse.add_argument('skps',
   nargs='+',
   help=".skp files or directories to expand for .skp files")
@@ -129,6 +133,8 @@
     ARGV.extend(['--pr'] + re.split(r'[ ,]', FLAGS.pr))
   if FLAGS.nocache:
     ARGV.extend(['--cachePathMasks', 'false'])
+  if FLAGS.gpuThreads != -1:
+    ARGV.extend(['--gpuThreads', str(FLAGS.gpuThreads)])
 
   # DDL parameters
   if FLAGS.ddl: