Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(939)

Issue 7230053: Unify flag parsing in bench_ and render_pictures. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 8 months ago by Leon
Modified:
11 years, 7 months ago
CC:
skia-review_googlegroups.com
Base URL:
https://skia.googlecode.com/svn/trunk
Visibility:
Public.

Description

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 Committed: https://code.google.com/p/skia/source/detail?r=7961

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 13

Patch Set 4 : Add header files to gflags.gyp. Attempt to use --similarity #

Patch Set 5 : Configure gflags in gyp_skia #

Patch Set 6 : Fix some warnings, and turn off warnings as errors for gflags. #

Patch Set 7 : Big changes - no longer uses gflags. #

Patch Set 8 : Fix for windows, remove changes to gyp_skia #

Total comments: 6

Patch Set 9 : Small cleanups #

Patch Set 10 : Add changes to configs for buildbots. #

Total comments: 8

Patch Set 11 : Change -i to -r to match gm. Rebase. #

Patch Set 12 : Change bench's logPerIter to just be a flag, with no 1 or 0 afterwards. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1067 lines, -1183 lines) Patch
M bench/benchmain.cpp View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +3 lines, -7 lines 0 comments Download
M gyp/tools.gyp View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M tools/CopyTilesRenderer.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M tools/PictureBenchmark.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M tools/PictureBenchmark.cpp View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M tools/PictureRenderer.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +5 lines, -0 lines 0 comments Download
A tools/PictureRenderingFlags.h View 1 2 3 4 5 6 7 8 1 chunk +34 lines, -0 lines 0 comments Download
A tools/PictureRenderingFlags.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +311 lines, -0 lines 0 comments Download
A tools/SkFlags.h View 1 2 3 4 5 6 7 8 1 chunk +345 lines, -0 lines 0 comments Download
A tools/SkFlags.cpp View 1 2 3 4 5 6 7 8 1 chunk +135 lines, -0 lines 0 comments Download
M tools/bench_pictures.cfg View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -3 lines 0 comments Download
M tools/bench_pictures_cfg_helper.py View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M tools/bench_pictures_main.cpp View 1 2 3 4 5 6 7 8 9 10 7 chunks +157 lines, -609 lines 0 comments Download
M tools/render_pictures_main.cpp View 1 2 3 4 5 6 7 8 9 10 12 chunks +63 lines, -559 lines 0 comments Download

Messages

Total messages: 14
Leon
Overall I like this change because it simplifies bench_pictures and render_pictures, but it's not without ...
11 years, 8 months ago (2013-01-30 22:30:28 UTC) #1
robertphillips
Leon - there still looks like there is still some pain involved with setting up ...
11 years, 8 months ago (2013-01-31 16:27:39 UTC) #2
edisonn
LGTM with comments https://codereview.appspot.com/7230053/diff/8002/tools/PictureRenderingFlags.cpp File tools/PictureRenderingFlags.cpp (right): https://codereview.appspot.com/7230053/diff/8002/tools/PictureRenderingFlags.cpp#newcode1 tools/PictureRenderingFlags.cpp:1: /* nit, optional: probably an "svn ...
11 years, 8 months ago (2013-01-31 16:39:51 UTC) #3
EricB
Tacking on a couple of comments... https://codereview.appspot.com/7230053/diff/8002/gyp/gflags.gyp File gyp/gflags.gyp (right): https://codereview.appspot.com/7230053/diff/8002/gyp/gflags.gyp#newcode19 gyp/gflags.gyp:19: '../third_party/externals/gflags/src/gflags_completions.cc', I'd suggest ...
11 years, 8 months ago (2013-01-31 17:14:31 UTC) #4
Leon
> Leon - there still looks like there is still some pain > involved with ...
11 years, 8 months ago (2013-02-01 23:44:41 UTC) #5
Leon
New approach. Instead of using gflags, I wrote my own (simplified) version. This was mostly ...
11 years, 7 months ago (2013-02-27 23:17:18 UTC) #6
Leon
https://codereview.appspot.com/7230053/diff/45001/tools/SkFlags.h File tools/SkFlags.h (right): https://codereview.appspot.com/7230053/diff/45001/tools/SkFlags.h#newcode331 tools/SkFlags.h:331: SkDebugf("double registering %s\n", name); On 2013/02/27 23:17:18, Leon wrote: ...
11 years, 7 months ago (2013-02-28 17:13:19 UTC) #7
EricB
This LGTM, with a couple of suggestions about long and short options. I'd be more ...
11 years, 7 months ago (2013-02-28 20:20:34 UTC) #8
Leon
Justin, do you mind taking a look at this change as well? https://codereview.appspot.com/7230053/diff/57002/tools/PictureRenderingFlags.cpp File tools/PictureRenderingFlags.cpp ...
11 years, 7 months ago (2013-03-01 01:54:19 UTC) #9
EricB
On 2013/03/01 01:54:19, Leon wrote: > Justin, do you mind taking a look at this ...
11 years, 7 months ago (2013-03-01 13:41:36 UTC) #10
Leon
Updated logPerIter in bench to behave the same as in bench_pictures, so bench_pictures can inherit ...
11 years, 7 months ago (2013-03-01 16:35:42 UTC) #11
robertphillips
Partial (and outdated) review notes - sorry https://codereview.appspot.com/7230053/diff/45001/tools/PictureRenderingFlags.cpp File tools/PictureRenderingFlags.cpp (right): https://codereview.appspot.com/7230053/diff/45001/tools/PictureRenderingFlags.cpp#newcode35 tools/PictureRenderingFlags.cpp:35: "Has no ...
11 years, 7 months ago (2013-03-02 17:50:01 UTC) #12
Leon
> Partial (and outdated) review notes - sorry No problem, Robert. Thanks for taking a ...
11 years, 7 months ago (2013-03-04 16:19:02 UTC) #13
Leon
11 years, 7 months ago (2013-03-04 16:41:29 UTC) #14
Message was sent while issue was closed.
Committed patchset #12 manually as r7961 (presubmit successful).
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b