Commit Graph

26 Commits

Author SHA1 Message Date
scroggo@google.com
161e1ba4c0 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
2013-03-04 16:41:06 +00:00
borenet@google.com
b15e6061c6 Turn off per-iteration tile time reporting
It's overloading the bench graph generator.
Review URL: https://codereview.appspot.com/7300088

git-svn-id: http://skia.googlecode.com/svn/trunk@7691 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-11 18:42:43 +00:00
skia.committer@gmail.com
ee235f9062 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@7659 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-08 07:16:45 +00:00
robertphillips@google.com
9b63c50d72 Only turn on one gpu timer in PictureBenchmark tool
https://codereview.appspot.com/7310060/



git-svn-id: http://skia.googlecode.com/svn/trunk@7651 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-07 20:20:27 +00:00
robertphillips@google.com
fe1b536bb7 Enhance GL error checking for non-Ganesh GL calls
https://codereview.appspot.com/7312057/



git-svn-id: http://skia.googlecode.com/svn/trunk@7647 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-07 19:45:46 +00:00
robertphillips@google.com
f9d0c95d8d Temporary patch to BenchPictures gpu timing problem
https://codereview.appspot.com/7311059/



git-svn-id: http://skia.googlecode.com/svn/trunk@7641 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-07 16:21:22 +00:00
scroggo@google.com
08085f808b Change the method for timing individual tiles in bench_pictures.
When timing individual tiles in bench_pictures, keep a timer running
across all repeats, and then take the average. The former method of
timing each iteration separately runs into precision errors on some
platforms.

Running on my Mac Pro with OSX 10.8, the cmsecs for the new method
and the old method are roughly the same when checking the CPU time.
When checking the wall time, the old method often gives me 0ms,
while the new method gives me a larger value. I don't think this
can be entirely attributed to rounding though, since on occasion I
see the old method showing a short time period (.05 - .15ms) while
the new method shows .15ms higher (which is in range for the
difference I'm seeing for other tiles where the old method reports
0ms).

Some other changes:
PictureRenderer::resetState now takes a boolean parameter. If called
with false, it will only do a flush, while if called with true, it
will also call finish.

resetState is now called with true everywhere except in between
iterations of drawing the same tile (when timing individual tiles).

render_pictures_main no longer calls resetState directly, since it
already calls end, which calls resetState.

BUG=http://code.google.com/p/skia/issues/detail?id=1066

Review URL: https://codereview.appspot.com/7101060

git-svn-id: http://skia.googlecode.com/svn/trunk@7424 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-28 20:40:24 +00:00
scroggo@google.com
cbcef70891 Provide an option to bench drawing individual tiles in bench_pictures.
Provides output like the following:
running bench [1236 12045] androidpolice.skp
  tile_256x256: tile [0,0] out of [5,48]: msecs =   1.00
  tile_256x256: tile [1,0] out of [5,48]: msecs =   1.50
  tile_256x256: tile [2,0] out of [5,48]: msecs =   1.00
  tile_256x256: tile [3,0] out of [5,48]: msecs =   1.50
  tile_256x256: tile [4,0] out of [5,48]: msecs =   2.50
  tile_256x256: tile [0,1] out of [5,48]: msecs =   2.00
  tile_256x256: tile [1,1] out of [5,48]: msecs =   3.50
  tile_256x256: tile [2,1] out of [5,48]: msecs =   3.50
  tile_256x256: tile [3,1] out of [5,48]: msecs =   6.00
  tile_256x256: tile [4,1] out of [5,48]: msecs =   2.50
  tile_256x256: tile [0,2] out of [5,48]: msecs =   2.00

BUG=https://code.google.com/p/skia/issues/detail?id=1016

Review URL: https://codereview.appspot.com/6937047

git-svn-id: http://skia.googlecode.com/svn/trunk@6805 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-13 22:09:28 +00:00
scroggo@google.com
0a049b861e Make bench_pictures output a meaningful config name.
Review URL: https://codereview.appspot.com/6813074

git-svn-id: http://skia.googlecode.com/svn/trunk@6288 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-02 22:01:26 +00:00
scroggo@google.com
3686c9d90a Fix a warning in PictureBenchmark.
Forgot to change from false to NULL. False does the right thing,
but gives a warning. Fix the warning.

Review URL: https://codereview.appspot.com/6570049

git-svn-id: http://skia.googlecode.com/svn/trunk@5666 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-25 17:36:36 +00:00
scroggo@google.com
81f9d2e05b In render_pictures tiled rendering, draw a separate PNG for each tile.
Since the passed in picture may represent an image which is too large
to be represented on the GPU, never create such a large canvas. Instead,
after drawing to each tile, create a file showing just that tile.

Review URL: https://codereview.appspot.com/6532056

git-svn-id: http://skia.googlecode.com/svn/trunk@5603 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-20 14:54:21 +00:00
scroggo@google.com
5239c32d1e Add -logPerIter, -timers, and -min to bench_pictures.
Additional changes:

Add instance count to bench_pictures.

Remove various PictureBenchmark subclasses which did not do
anything besides have a different PictureRenderer.

BUG=https://code.google.com/p/skia/issues/detail?id=856

Review URL: https://codereview.appspot.com/6496109

git-svn-id: http://skia.googlecode.com/svn/trunk@5496 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-11 19:15:32 +00:00
scroggo@google.com
9a4125283a Report data from bench_pictures in the same fashion as bench.
Move SkBenchLogger into separate files and make bench_pictures use it.
Remove sk_tools::print_msg, since SkBenchLogger is now used instead.

Combine picture_benchmark with bench_pictures, since that is the
only project that uses it.

Refactor the aggregator for bench timer data into its own class and
make bench_pictures use it.

Consolidate the various virtual PictureBenchmark::run functions
into one for reuse.

BUG=https://code.google.com/p/skia/issues/detail?id=822

Review URL: https://codereview.appspot.com/6488086

git-svn-id: http://skia.googlecode.com/svn/trunk@5432 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-07 15:21:18 +00:00
scroggo@google.com
58b4ead36c Perform multi core rendering in bench_pictures.
Add a flag in SkGPipeWriter for threadsafe drawing.

Add a deferred pipe controller to SamplePipeControllers, which can
be called to play back in multiple threads.

Depends on http://codereview.appspot.com/6459105/

Review URL: https://codereview.appspot.com/6482068

git-svn-id: http://skia.googlecode.com/svn/trunk@5371 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-31 16:15:22 +00:00
rileya@google.com
edfbff683e Change picture record benchmark to include begin/end record in timings and make the source picture draw itself into record canvas, so it records the draws instead of directly copying the picture.
Review URL: https://codereview.appspot.com/6501045

git-svn-id: http://skia.googlecode.com/svn/trunk@5323 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-28 19:13:39 +00:00
robertphillips@google.com
91ee3a11ed Added second "truncated" cpu/wall timer to bench
http://codereview.appspot.com/6476064/

This CL will increase the bench baselines across the board



git-svn-id: http://skia.googlecode.com/svn/trunk@5305 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-28 12:18:40 +00:00
keyar@chromium.org
f4959ab118 Implemented power of two tiling.
Review URL: https://codereview.appspot.com/6485056

git-svn-id: http://skia.googlecode.com/svn/trunk@5274 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-23 20:53:25 +00:00
keyar@chromium.org
db9a5fb55f Benchmark results will now print to STDOUT if on not-Android.
Review URL: https://codereview.appspot.com/6446164

git-svn-id: http://skia.googlecode.com/svn/trunk@5215 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-21 17:57:59 +00:00
keyar@chromium.org
378c97fae0 Deleted timer for record and unflatten benchmarks.
git-svn-id: http://skia.googlecode.com/svn/trunk@5185 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-20 15:04:09 +00:00
keyar@chromium.org
941844b3f9 Changed new and delete to SkNEW* and SkDELETE as appropriate.
git-svn-id: http://skia.googlecode.com/svn/trunk@5179 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-20 15:03:54 +00:00
keyar@chromium.org
f8a513fbcd resetState is called between every benchmark run.
git-svn-id: http://skia.googlecode.com/svn/trunk@5178 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-20 15:03:52 +00:00
keyar@chromium.org
77a5522d0e State reset and gpu timers added.
git-svn-id: http://skia.googlecode.com/svn/trunk@5177 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-20 15:03:47 +00:00
keyar@chromium.org
78a35c5f1d Changed to Yoda style comparisons where appropriate.
git-svn-id: http://skia.googlecode.com/svn/trunk@5176 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-20 15:03:44 +00:00
keyar@chromium.org
fe6391a624 Have GPU based approach workingish.
Benchmarks do not work and it is always on.

git-svn-id: http://skia.googlecode.com/svn/trunk@5175 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-20 15:03:41 +00:00
keyar@chromium.org
9d696c0d04 Refactored the bitmap creation into PictureRenderer.
Further, the picture is also stored in the PictureRenderer.

The main gain of all of this is that we will not have to change how the device in more than one place when we end up adding different devices.

Review URL: https://codereview.appspot.com/6458074

git-svn-id: http://skia.googlecode.com/svn/trunk@4990 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-07 17:11:33 +00:00
keyar@chromium.org
163b56734f Merged bench_pictures and render_pictures rendering methods.
bench_pictures now uses a class based method for choosing the benchmark type as well.

Review URL: https://codereview.appspot.com/6452070

git-svn-id: http://skia.googlecode.com/svn/trunk@4894 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-01 17:53:29 +00:00