Created my own flag parser, based off of gflags.
Share common code between bench_ and render_ to set up the PictureRenderer.
Fix an include error in SkPictureRenderer.h.
Simplified parameter passing in render_pictures_main.
Switch to using an SkAutoTUnref for the PictureRenderer.
I also changed the input format somewhat, so the buildbots need to be updated as well: https://codereview.appspot.com/7441044/
Fixed a bug in PictureBenchmark where calling setTimeIndividualTiles(false) sets the member variable to true.
Removed setDeviceType from PictureBenchmark, since only the PictureRenderer needs to know which device type to use.
Some changes to the input format:
'--logPerIter' no longer takes a 1 or 0. Instead, '--logPerIter'
turns it on and '--nologPerIter' turns it off (with off as the
default). (Note that this is for bench_pictures; bench still uses the old format)
Change '--device' to '--config' and 'bitmap' to '8888' to be
the same as gm.
Requires '--r' before inputs (to match gm), though there can be multiple inputs following it.
Changed --enable-deferred-image-decoding (which no one uses but me yet anyway) to --deferImageDecoding, since the former is incompatible with the flag parser.
Changes to behavior:
Show a short error message on failure (rather than the explanation of all
flags).
BUG=https://code.google.com/p/skia/issues/detail?id=1094
Review URL: https://codereview.appspot.com/7230053
git-svn-id: http://skia.googlecode.com/svn/trunk@7961 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tools/bench_pictures.cfg b/tools/bench_pictures.cfg
index f525ceb..102c744 100644
--- a/tools/bench_pictures.cfg
+++ b/tools/bench_pictures.cfg
@@ -103,10 +103,10 @@
# a dictionary of key/value pairs directly corresponding to the command-line
# flags passed to bench_pictures.
bench_pictures_cfg = {
- 'angle': [TiledConfig(DEFAULT_TILE_X, DEFAULT_TILE_Y, device='angle')],
+ 'angle': [TiledConfig(DEFAULT_TILE_X, DEFAULT_TILE_Y, config='angle')],
'debug': [TiledBitmapConfig(DEFAULT_TILE_X, DEFAULT_TILE_Y)],
'default': default_configs,
- 'no_gpu': [cfg for cfg in default_configs if cfg['device'] != 'gpu'],
+ 'no_gpu': [cfg for cfg in default_configs if cfg['config'] != 'gpu'],
'nexus_s': AndroidConfigList((256, 256), 0.4897, [], (480, 800),
do_gpu=False),
'xoom': AndroidConfigList((256, 256), 1.2244, [], (1200, 800)),
@@ -114,4 +114,4 @@
'nexus_4': AndroidConfigList((256, 256), 0.7836, [], (768, 1280)),
'nexus_7': AndroidConfigList((256, 256), 1.3061, [2], (1280, 800)),
'nexus_10': AndroidConfigList((512, 512), 2.6122, [], (2560, 1600)),
-}
\ No newline at end of file
+}