aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/PictureOverheadBench.cpp
Commit message (Collapse)AuthorAge
* bench clip overhead during recordingGravatar Mike Reed2017-03-06
| | | | | | | | | BUG=skia: Change-Id: I739c5a7f44380e1218627b1b6430a03950ae84aa Reviewed-on: https://skia-review.googlesource.com/9309 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Refactor SkLiteDL to no longer extend SkDrawable.Gravatar Derek Sollenberger2017-03-02
| | | | | | | | | Change-Id: Ieaa849bceba0e98e4c99491c721fe945a0694e68 Reviewed-on: https://skia-review.googlesource.com/9111 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Stan Iliev <stani@google.com> Commit-Queue: Derek Sollenberger <djsollen@google.com>
* No \n in bench names.Gravatar jcgregorio2016-09-13
| | | | | | | | BUG=skia: R=mtklein GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2332153003 Review-Url: https://codereview.chromium.org/2332153003
* SkLite*Gravatar mtklein2016-08-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | SkLiteRecorder, a new SkCanvas, fills out SkLiteDL, a new SkDrawable. This SkDrawable is a display list similar to SkRecord and SkBigPicture / SkRecordedDrawable, but with a few new design points inspired by Android and slimming paint: 1) SkLiteDL is structured as one big contiguous array rather than the two layer structure of SkRecord. This trades away flexibility and large-op-count performance for better data locality for small to medium size pictures. 2) We keep a global freelist of SkLiteDLs, both reusing the SkLiteDL struct itself and its contiguous byte array. This keeps the expected number of mallocs per display list allocation <1 (really, ~0) for cyclical use cases. These two together mean recording is faster. Measuring against the code we use at head, SkLiteRecorder trends about ~3x faster across various size pictures, matching speed at 0 draws and beating the special-case 1-draw pictures we have today. (I.e. we won't need those special case implementations anymore, because they're slower than this new generic code.) This new strategy records 10 drawRects() in about the same time the old strategy took for 2. This strategy stays the winner until at least 500 drawRect()s on my laptop, where I stopped checking. A simpler alternative to freelisting is also possible (but not implemented here), where we allow the client to manually reset() an SkLiteDL for reuse when its refcnt is 1. That's essentially what we're doing with the freelist, except tracking what's available for reuse globally instead of making the client do it. This code is not fully capable yet, but most of the key design points are there. The internal structure of SkLiteDL is the area I expect to be most volatile (anything involving Op), but its interface and the whole of SkLiteRecorder ought to be just about done. You can run nanobench --match picture_overhead as a demo. Everything it exercises is fully fleshed out, so what it tests is an apples-to-apples comparison as far as recording costs go. I have not yet compared playback performance. It should be simple to wrap this into an SkPicture subclass if we want. I won't start proposing we replace anything old with anything new quite yet until I have more ducks in a row, but this does look pretty promising (similar to the SkRecord over old SkPicture change a couple years ago) and I'd like to land, experiment, iterate, especially with an eye toward Android. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2213333002 Review-Url: https://codereview.chromium.org/2213333002
* return pictures as sk_spGravatar reed2016-03-18
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1811703002 Review URL: https://codereview.chromium.org/1811703002
* Remove const from `const int loops`.Gravatar mtklein2015-10-01
| | | | | | | | This drives me nuts, and prevents `while (loops --> 0)`. BUG=skia: Review URL: https://codereview.chromium.org/1379923005
* Expand bench to cover no-draw SkPictures too.Gravatar mtklein2015-04-06
| | | | | | | | This looks a lot closer to what Chromium's profiling is showing. BUG=chromium:470553 Review URL: https://codereview.chromium.org/1063723002
* Add a bench to measure SkPictureRecorder constant overhead.Gravatar mtklein2015-04-03
BUG=chromium:470553 Review URL: https://codereview.chromium.org/1061633002