diff options
author | scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-01-28 20:40:24 +0000 |
---|---|---|
committer | scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-01-28 20:40:24 +0000 |
commit | 08085f808b808bfb14fcb247bb8cb1a5e8d43dcc (patch) | |
tree | 8f5e9c6e15581722aae710a7a815f65b5d26ceb4 /samplecode | |
parent | cc78238f0b6aa1a7b3fc767758d9eeef4c1bffa9 (diff) |
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
Diffstat (limited to 'samplecode')
0 files changed, 0 insertions, 0 deletions