blob: 2f5fb0e6c66c9e425cafa23d8aad5dbd22d14b45 [file] [log] [blame]
reed@google.com006db0f2012-06-27 19:33:29 +00001/*
2 * Copyright 2012 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#include "BenchTimer.h"
keyar@chromium.org163b5672012-08-01 17:53:29 +00009#include "PictureBenchmark.h"
scroggo@google.com9a412522012-09-07 15:21:18 +000010#include "SkBenchLogger.h"
reed@google.com006db0f2012-06-27 19:33:29 +000011#include "SkCanvas.h"
scroggo@google.com0a36f432012-09-10 20:29:13 +000012#include "SkGraphics.h"
keyar@chromium.orgf4959ab2012-08-23 20:53:25 +000013#include "SkMath.h"
reed@google.com006db0f2012-06-27 19:33:29 +000014#include "SkOSFile.h"
15#include "SkPicture.h"
16#include "SkStream.h"
17#include "SkTArray.h"
18#include "picture_utils.h"
19
20const int DEFAULT_REPEATS = 100;
reed@google.com006db0f2012-06-27 19:33:29 +000021
22static void usage(const char* argv0) {
23 SkDebugf("SkPicture benchmarking tool\n");
24 SkDebugf("\n"
25"Usage: \n"
keyar@chromium.orgd1dc9202012-07-09 18:32:08 +000026" %s <inputDir>...\n"
scroggo@google.com5239c322012-09-11 19:15:32 +000027" [--logFile filename][--timers [wcgWC]*][--logPerIter 1|0][--min]\n"
keyar@chromium.org795cd472012-08-02 18:57:53 +000028" [--repeat] \n"
scroggo@google.com58b4ead2012-08-31 16:15:22 +000029" [--mode pow2tile minWidth height[] (multi) | record | simple\n"
scroggo@google.com9a412522012-09-07 15:21:18 +000030" | tile width[] height[] (multi) | playbackCreation]\n"
scroggo@google.com58b4ead2012-08-31 16:15:22 +000031" [--pipe]\n"
keyar@chromium.orgc81686c2012-08-20 15:04:04 +000032" [--device bitmap"
33#if SK_SUPPORT_GPU
34" | gpu"
35#endif
36"]"
reed@google.com006db0f2012-06-27 19:33:29 +000037, argv0);
38 SkDebugf("\n\n");
39 SkDebugf(
keyar@chromium.org795cd472012-08-02 18:57:53 +000040" inputDir: A list of directories and files to use as input. Files are\n"
scroggo@google.com9a412522012-09-07 15:21:18 +000041" expected to have the .skp extension.\n\n"
42" --logFile filename : destination for writing log output, in addition to stdout.\n");
scroggo@google.com5239c322012-09-11 19:15:32 +000043 SkDebugf(" --logPerIter 1|0 : "
44 "Log each repeat timer instead of mean, default is disabled.\n");
45 SkDebugf(" --min : Print the minimum times (instead of average).\n");
46 SkDebugf(" --timers [wcgWC]* : "
47 "Display wall, cpu, gpu, truncated wall or truncated cpu time for each picture.\n");
reed@google.com006db0f2012-06-27 19:33:29 +000048 SkDebugf(
scroggo@google.com58b4ead2012-08-31 16:15:22 +000049" --mode pow2tile minWidht height[] (multi) | record | simple\n"
scroggo@google.com9a412522012-09-07 15:21:18 +000050" | tile width[] height[] (multi) | playbackCreation:\n"
scroggo@google.com58b4ead2012-08-31 16:15:22 +000051" Run in the corresponding mode.\n"
52" Default is simple.\n");
keyar@chromium.orgcf6c44c2012-07-09 19:37:40 +000053 SkDebugf(
scroggo@google.com58b4ead2012-08-31 16:15:22 +000054" pow2tile minWidth height[], Creates tiles with widths\n"
55" that are all a power of two\n"
56" such that they minimize the\n"
57" amount of wasted tile space.\n"
58" minWidth is the minimum width\n"
59" of these tiles and must be a\n"
60" power of two. Simple\n"
61" rendering using these tiles\n"
62" is benchmarked.\n"
63" Append \"multi\" for multithreaded\n"
64" drawing.\n");
keyar@chromium.orgf4959ab2012-08-23 20:53:25 +000065 SkDebugf(
keyar@chromium.org795cd472012-08-02 18:57:53 +000066" record, Benchmark picture to picture recording.\n");
67 SkDebugf(
68" simple, Benchmark a simple rendering.\n");
69 SkDebugf(
scroggo@google.com58b4ead2012-08-31 16:15:22 +000070" tile width[] height[], Benchmark simple rendering using\n"
71" tiles with the given dimensions.\n"
72" Append \"multi\" for multithreaded\n"
73" drawing.\n");
keyar@chromium.org795cd472012-08-02 18:57:53 +000074 SkDebugf(
scroggo@google.com9a412522012-09-07 15:21:18 +000075" playbackCreation, Benchmark creation of the SkPicturePlayback.\n");
keyar@chromium.org795cd472012-08-02 18:57:53 +000076 SkDebugf("\n");
77 SkDebugf(
scroggo@google.com58b4ead2012-08-31 16:15:22 +000078" --pipe: Benchmark SkGPipe rendering. Compatible with tiled, multithreaded rendering.\n");
79 SkDebugf(
keyar@chromium.orgc81686c2012-08-20 15:04:04 +000080" --device bitmap"
81#if SK_SUPPORT_GPU
82" | gpu"
83#endif
84": Use the corresponding device. Default is bitmap.\n");
85 SkDebugf(
86" bitmap, Render to a bitmap.\n");
keyar@chromium.orgc81686c2012-08-20 15:04:04 +000087#if SK_SUPPORT_GPU
keyar@chromium.orga40c20d2012-08-20 15:04:12 +000088 SkDebugf(
keyar@chromium.orgc81686c2012-08-20 15:04:04 +000089" gpu, Render to the GPU.\n");
90#endif
91 SkDebugf("\n");
92 SkDebugf(
keyar@chromium.org795cd472012-08-02 18:57:53 +000093" --repeat: "
reed@google.com006db0f2012-06-27 19:33:29 +000094"Set the number of times to repeat each test."
95" Default is %i.\n", DEFAULT_REPEATS);
reed@google.com006db0f2012-06-27 19:33:29 +000096}
97
scroggo@google.com9a412522012-09-07 15:21:18 +000098SkBenchLogger gLogger;
99
keyar@chromium.orgd1dc9202012-07-09 18:32:08 +0000100static void run_single_benchmark(const SkString& inputPath,
keyar@chromium.org163b5672012-08-01 17:53:29 +0000101 sk_tools::PictureBenchmark& benchmark) {
reed@google.com006db0f2012-06-27 19:33:29 +0000102 SkFILEStream inputStream;
103
reed@google.com006db0f2012-06-27 19:33:29 +0000104 inputStream.setPath(inputPath.c_str());
105 if (!inputStream.isValid()) {
scroggo@google.com9a412522012-09-07 15:21:18 +0000106 SkString err;
107 err.printf("Could not open file %s\n", inputPath.c_str());
108 gLogger.logError(err);
reed@google.com006db0f2012-06-27 19:33:29 +0000109 return;
110 }
111
112 SkPicture picture(&inputStream);
reed@google.com006db0f2012-06-27 19:33:29 +0000113
keyar@chromium.orgd1dc9202012-07-09 18:32:08 +0000114 SkString filename;
115 sk_tools::get_basename(&filename, inputPath);
keyar@chromium.orgdb9a5fb2012-08-21 17:57:59 +0000116
117 SkString result;
118 result.printf("running bench [%i %i] %s ", picture.width(), picture.height(),
119 filename.c_str());
scroggo@google.com9a412522012-09-07 15:21:18 +0000120 gLogger.logProgress(result);
keyar@chromium.orgd1dc9202012-07-09 18:32:08 +0000121
keyar@chromium.org163b5672012-08-01 17:53:29 +0000122 benchmark.run(&picture);
keyar@chromium.org0665f252012-07-10 18:30:18 +0000123}
124
keyar@chromium.org163b5672012-08-01 17:53:29 +0000125static void parse_commandline(int argc, char* const argv[], SkTArray<SkString>* inputs,
scroggo@google.com5239c322012-09-11 19:15:32 +0000126 sk_tools::PictureBenchmark* benchmark) {
reed@google.com006db0f2012-06-27 19:33:29 +0000127 const char* argv0 = argv[0];
128 char* const* stop = argv + argc;
129
keyar@chromium.org163b5672012-08-01 17:53:29 +0000130 int repeats = DEFAULT_REPEATS;
keyar@chromium.orgc81686c2012-08-20 15:04:04 +0000131 sk_tools::PictureRenderer::SkDeviceTypes deviceType =
132 sk_tools::PictureRenderer::kBitmap_DeviceType;
keyar@chromium.org163b5672012-08-01 17:53:29 +0000133
scroggo@google.com5239c322012-09-11 19:15:32 +0000134 sk_tools::PictureRenderer* renderer = NULL;
135
scroggo@google.com9a412522012-09-07 15:21:18 +0000136 // Create a string to show our current settings.
137 // TODO: Make it prettier. Currently it just repeats the command line.
138 SkString commandLine("bench_pictures:");
139 for (int i = 1; i < argc; i++) {
140 commandLine.appendf(" %s", *(argv+i));
141 }
142 commandLine.append("\n");
143
scroggo@google.com58b4ead2012-08-31 16:15:22 +0000144 bool usePipe = false;
145 bool multiThreaded = false;
146 bool useTiles = false;
147 const char* widthString = NULL;
148 const char* heightString = NULL;
149 bool isPowerOf2Mode = false;
150 const char* mode = NULL;
reed@google.com006db0f2012-06-27 19:33:29 +0000151 for (++argv; argv < stop; ++argv) {
152 if (0 == strcmp(*argv, "--repeat")) {
153 ++argv;
154 if (argv < stop) {
keyar@chromium.org163b5672012-08-01 17:53:29 +0000155 repeats = atoi(*argv);
156 if (repeats < 1) {
scroggo@google.com9a412522012-09-07 15:21:18 +0000157 gLogger.logError("--repeat must be given a value > 0\n");
reed@google.com006db0f2012-06-27 19:33:29 +0000158 exit(-1);
159 }
160 } else {
scroggo@google.com9a412522012-09-07 15:21:18 +0000161 gLogger.logError("Missing arg for --repeat\n");
reed@google.com006db0f2012-06-27 19:33:29 +0000162 usage(argv0);
163 exit(-1);
164 }
scroggo@google.com58b4ead2012-08-31 16:15:22 +0000165 } else if (0 == strcmp(*argv, "--pipe")) {
166 usePipe = true;
scroggo@google.com9a412522012-09-07 15:21:18 +0000167 } else if (0 == strcmp(*argv, "--logFile")) {
168 argv++;
169 if (argv < stop) {
170 if (!gLogger.SetLogFile(*argv)) {
171 SkString str;
172 str.printf("Could not open %s for writing.", *argv);
173 gLogger.logError(str);
174 usage(argv0);
175 exit(-1);
176 }
177 } else {
178 gLogger.logError("Missing arg for --logFile\n");
179 usage(argv0);
180 exit(-1);
181 }
keyar@chromium.org795cd472012-08-02 18:57:53 +0000182 } else if (0 == strcmp(*argv, "--mode")) {
keyar@chromium.org795cd472012-08-02 18:57:53 +0000183
reed@google.com006db0f2012-06-27 19:33:29 +0000184 ++argv;
keyar@chromium.org795cd472012-08-02 18:57:53 +0000185 if (argv >= stop) {
scroggo@google.com9a412522012-09-07 15:21:18 +0000186 gLogger.logError("Missing mode for --mode\n");
keyar@chromium.org795cd472012-08-02 18:57:53 +0000187 usage(argv0);
188 exit(-1);
189 }
190
scroggo@google.com58b4ead2012-08-31 16:15:22 +0000191 if (0 == strcmp(*argv, "record")) {
scroggo@google.com5239c322012-09-11 19:15:32 +0000192 renderer = SkNEW(sk_tools::RecordPictureRenderer);
keyar@chromium.org795cd472012-08-02 18:57:53 +0000193 } else if (0 == strcmp(*argv, "simple")) {
scroggo@google.com5239c322012-09-11 19:15:32 +0000194 renderer = SkNEW(sk_tools::SimplePictureRenderer);
keyar@chromium.orgf4959ab2012-08-23 20:53:25 +0000195 } else if ((0 == strcmp(*argv, "tile")) || (0 == strcmp(*argv, "pow2tile"))) {
scroggo@google.com58b4ead2012-08-31 16:15:22 +0000196 useTiles = true;
197 mode = *argv;
keyar@chromium.orgf4959ab2012-08-23 20:53:25 +0000198
199 if (0 == strcmp(*argv, "pow2tile")) {
200 isPowerOf2Mode = true;
201 }
202
keyar@chromium.org795cd472012-08-02 18:57:53 +0000203 ++argv;
204 if (argv >= stop) {
scroggo@google.com9a412522012-09-07 15:21:18 +0000205 SkString err;
206 err.printf("Missing width for --mode %s\n", mode);
207 gLogger.logError(err);
keyar@chromium.org795cd472012-08-02 18:57:53 +0000208 usage(argv0);
209 exit(-1);
210 }
211
scroggo@google.com58b4ead2012-08-31 16:15:22 +0000212 widthString = *argv;
keyar@chromium.org795cd472012-08-02 18:57:53 +0000213 ++argv;
214 if (argv >= stop) {
scroggo@google.com9a412522012-09-07 15:21:18 +0000215 gLogger.logError("Missing height for --mode tile\n");
keyar@chromium.org795cd472012-08-02 18:57:53 +0000216 usage(argv0);
217 exit(-1);
218 }
scroggo@google.com58b4ead2012-08-31 16:15:22 +0000219 heightString = *argv;
keyar@chromium.org795cd472012-08-02 18:57:53 +0000220
scroggo@google.com58b4ead2012-08-31 16:15:22 +0000221 ++argv;
222 if (argv < stop && 0 == strcmp(*argv, "multi")) {
223 multiThreaded = true;
keyar@chromium.org0665f252012-07-10 18:30:18 +0000224 } else {
scroggo@google.com58b4ead2012-08-31 16:15:22 +0000225 --argv;
reed@google.com006db0f2012-06-27 19:33:29 +0000226 }
scroggo@google.com9a412522012-09-07 15:21:18 +0000227 } else if (0 == strcmp(*argv, "playbackCreation")) {
scroggo@google.com5239c322012-09-11 19:15:32 +0000228 renderer = SkNEW(sk_tools::PlaybackCreationRenderer);
reed@google.com006db0f2012-06-27 19:33:29 +0000229 } else {
scroggo@google.com9a412522012-09-07 15:21:18 +0000230 SkString err;
231 err.printf("%s is not a valid mode for --mode\n", *argv);
232 gLogger.logError(err);
keyar@chromium.org0665f252012-07-10 18:30:18 +0000233 usage(argv0);
reed@google.com006db0f2012-06-27 19:33:29 +0000234 exit(-1);
235 }
keyar@chromium.orgc81686c2012-08-20 15:04:04 +0000236 } else if (0 == strcmp(*argv, "--device")) {
237 ++argv;
238 if (argv >= stop) {
scroggo@google.com9a412522012-09-07 15:21:18 +0000239 gLogger.logError("Missing mode for --deivce\n");
keyar@chromium.orgc81686c2012-08-20 15:04:04 +0000240 usage(argv0);
241 exit(-1);
242 }
243
244 if (0 == strcmp(*argv, "bitmap")) {
245 deviceType = sk_tools::PictureRenderer::kBitmap_DeviceType;
246 }
247#if SK_SUPPORT_GPU
248 else if (0 == strcmp(*argv, "gpu")) {
249 deviceType = sk_tools::PictureRenderer::kGPU_DeviceType;
250 }
251#endif
252 else {
scroggo@google.com9a412522012-09-07 15:21:18 +0000253 SkString err;
254 err.printf("%s is not a valid mode for --device\n", *argv);
255 gLogger.logError(err);
keyar@chromium.orgc81686c2012-08-20 15:04:04 +0000256 usage(argv0);
257 exit(-1);
258 }
scroggo@google.com5239c322012-09-11 19:15:32 +0000259 } else if (0 == strcmp(*argv, "--timers")) {
260 ++argv;
261 if (argv < stop) {
262 bool timerWall = false;
263 bool truncatedTimerWall = false;
264 bool timerCpu = false;
265 bool truncatedTimerCpu = false;
266 bool timerGpu = false;
267 for (char* t = *argv; *t; ++t) {
268 switch (*t) {
269 case 'w':
270 timerWall = true;
271 break;
272 case 'c':
273 timerCpu = true;
274 break;
275 case 'W':
276 truncatedTimerWall = true;
277 break;
278 case 'C':
279 truncatedTimerCpu = true;
280 break;
281 case 'g':
282 timerGpu = true;
283 break;
284 default: {
285 break;
286 }
287 }
288 }
289 benchmark->setTimersToShow(timerWall, truncatedTimerWall, timerCpu,
290 truncatedTimerCpu, timerGpu);
291 } else {
292 gLogger.logError("Missing arg for --timers\n");
293 usage(argv0);
294 exit(-1);
295 }
296 } else if (0 == strcmp(*argv, "--min")) {
297 benchmark->setPrintMin(true);
298 } else if (0 == strcmp(*argv, "--logPerIter")) {
299 ++argv;
300 if (argv < stop) {
301 bool log = atoi(*argv) != 0;
302 benchmark->setLogPerIter(log);
303 } else {
304 gLogger.logError("Missing arg for --logPerIter\n");
305 usage(argv0);
306 exit(-1);
307 }
reed@google.com006db0f2012-06-27 19:33:29 +0000308 } else if (0 == strcmp(*argv, "--help") || 0 == strcmp(*argv, "-h")) {
309 usage(argv0);
310 exit(0);
311 } else {
keyar@chromium.orgd1dc9202012-07-09 18:32:08 +0000312 inputs->push_back(SkString(*argv));
reed@google.com006db0f2012-06-27 19:33:29 +0000313 }
314 }
315
scroggo@google.com58b4ead2012-08-31 16:15:22 +0000316 if (useTiles) {
scroggo@google.com5239c322012-09-11 19:15:32 +0000317 SkASSERT(NULL == renderer);
318 sk_tools::TiledPictureRenderer* tiledRenderer = SkNEW(sk_tools::TiledPictureRenderer);
scroggo@google.com58b4ead2012-08-31 16:15:22 +0000319 if (isPowerOf2Mode) {
320 int minWidth = atoi(widthString);
321 if (!SkIsPow2(minWidth) || minWidth < 0) {
scroggo@google.com5239c322012-09-11 19:15:32 +0000322 tiledRenderer->unref();
scroggo@google.com9a412522012-09-07 15:21:18 +0000323 SkString err;
scroggo@google.com5239c322012-09-11 19:15:32 +0000324 err.printf("-mode %s must be given a width"
scroggo@google.com58b4ead2012-08-31 16:15:22 +0000325 " value that is a power of two\n", mode);
scroggo@google.com9a412522012-09-07 15:21:18 +0000326 gLogger.logError(err);
scroggo@google.com58b4ead2012-08-31 16:15:22 +0000327 exit(-1);
328 }
scroggo@google.com5239c322012-09-11 19:15:32 +0000329 tiledRenderer->setTileMinPowerOf2Width(minWidth);
scroggo@google.com58b4ead2012-08-31 16:15:22 +0000330 } else if (sk_tools::is_percentage(widthString)) {
scroggo@google.com5239c322012-09-11 19:15:32 +0000331 tiledRenderer->setTileWidthPercentage(atof(widthString));
332 if (!(tiledRenderer->getTileWidthPercentage() > 0)) {
333 tiledRenderer->unref();
scroggo@google.com9a412522012-09-07 15:21:18 +0000334 gLogger.logError("--mode tile must be given a width percentage > 0\n");
scroggo@google.com58b4ead2012-08-31 16:15:22 +0000335 exit(-1);
336 }
337 } else {
scroggo@google.com5239c322012-09-11 19:15:32 +0000338 tiledRenderer->setTileWidth(atoi(widthString));
339 if (!(tiledRenderer->getTileWidth() > 0)) {
340 tiledRenderer->unref();
scroggo@google.com9a412522012-09-07 15:21:18 +0000341 gLogger.logError("--mode tile must be given a width > 0\n");
scroggo@google.com58b4ead2012-08-31 16:15:22 +0000342 exit(-1);
343 }
344 }
345
346 if (sk_tools::is_percentage(heightString)) {
scroggo@google.com5239c322012-09-11 19:15:32 +0000347 tiledRenderer->setTileHeightPercentage(atof(heightString));
348 if (!(tiledRenderer->getTileHeightPercentage() > 0)) {
349 tiledRenderer->unref();
scroggo@google.com9a412522012-09-07 15:21:18 +0000350 gLogger.logError("--mode tile must be given a height percentage > 0\n");
scroggo@google.com58b4ead2012-08-31 16:15:22 +0000351 exit(-1);
352 }
353 } else {
scroggo@google.com5239c322012-09-11 19:15:32 +0000354 tiledRenderer->setTileHeight(atoi(heightString));
355 if (!(tiledRenderer->getTileHeight() > 0)) {
356 tiledRenderer->unref();
scroggo@google.com9a412522012-09-07 15:21:18 +0000357 gLogger.logError("--mode tile must be given a height > 0\n");
scroggo@google.com58b4ead2012-08-31 16:15:22 +0000358 exit(-1);
359 }
360 }
scroggo@google.com5239c322012-09-11 19:15:32 +0000361 tiledRenderer->setMultiThreaded(multiThreaded);
362 tiledRenderer->setUsePipe(usePipe);
363 renderer = tiledRenderer;
scroggo@google.com58b4ead2012-08-31 16:15:22 +0000364 } else if (usePipe) {
scroggo@google.com5239c322012-09-11 19:15:32 +0000365 renderer = SkNEW(sk_tools::PipePictureRenderer);
scroggo@google.com58b4ead2012-08-31 16:15:22 +0000366 }
keyar@chromium.orgd1dc9202012-07-09 18:32:08 +0000367 if (inputs->count() < 1) {
keyar@chromium.org163b5672012-08-01 17:53:29 +0000368 SkDELETE(benchmark);
reed@google.com006db0f2012-06-27 19:33:29 +0000369 usage(argv0);
370 exit(-1);
371 }
keyar@chromium.org163b5672012-08-01 17:53:29 +0000372
scroggo@google.com5239c322012-09-11 19:15:32 +0000373 if (NULL == renderer) {
374 renderer = SkNEW(sk_tools::SimplePictureRenderer);
keyar@chromium.org163b5672012-08-01 17:53:29 +0000375 }
scroggo@google.com5239c322012-09-11 19:15:32 +0000376 benchmark->setRenderer(renderer)->unref();
keyar@chromium.org163b5672012-08-01 17:53:29 +0000377 benchmark->setRepeats(repeats);
keyar@chromium.orgc81686c2012-08-20 15:04:04 +0000378 benchmark->setDeviceType(deviceType);
scroggo@google.com9a412522012-09-07 15:21:18 +0000379 benchmark->setLogger(&gLogger);
380 // Report current settings:
381 gLogger.logProgress(commandLine);
keyar@chromium.orgd1dc9202012-07-09 18:32:08 +0000382}
reed@google.com006db0f2012-06-27 19:33:29 +0000383
keyar@chromium.org163b5672012-08-01 17:53:29 +0000384static void process_input(const SkString& input, sk_tools::PictureBenchmark& benchmark) {
keyar@chromium.orgd1dc9202012-07-09 18:32:08 +0000385 SkOSFile::Iter iter(input.c_str(), "skp");
386 SkString inputFilename;
387
388 if (iter.next(&inputFilename)) {
389 do {
390 SkString inputPath;
keyar@chromium.org163b5672012-08-01 17:53:29 +0000391 sk_tools::make_filepath(&inputPath, input, inputFilename);
392 run_single_benchmark(inputPath, benchmark);
keyar@chromium.orgd1dc9202012-07-09 18:32:08 +0000393 } while(iter.next(&inputFilename));
394 } else {
keyar@chromium.org163b5672012-08-01 17:53:29 +0000395 run_single_benchmark(input, benchmark);
keyar@chromium.orgd1dc9202012-07-09 18:32:08 +0000396 }
reed@google.com006db0f2012-06-27 19:33:29 +0000397}
398
399int main(int argc, char* const argv[]) {
scroggo@google.com5239c322012-09-11 19:15:32 +0000400#ifdef SK_ENABLE_INST_COUNT
401 gPrintInstCount = true;
402#endif
scroggo@google.com0a36f432012-09-10 20:29:13 +0000403 SkAutoGraphics ag;
reed@google.com006db0f2012-06-27 19:33:29 +0000404
scroggo@google.com5239c322012-09-11 19:15:32 +0000405 SkTArray<SkString> inputs;
406 sk_tools::PictureBenchmark benchmark;
407
408 parse_commandline(argc, argv, &inputs, &benchmark);
reed@google.com006db0f2012-06-27 19:33:29 +0000409
keyar@chromium.orgd1dc9202012-07-09 18:32:08 +0000410 for (int i = 0; i < inputs.count(); ++i) {
scroggo@google.com5239c322012-09-11 19:15:32 +0000411 process_input(inputs[i], benchmark);
reed@google.com006db0f2012-06-27 19:33:29 +0000412 }
reed@google.com006db0f2012-06-27 19:33:29 +0000413}