diff options
author | 2014-10-09 12:36:48 -0700 | |
---|---|---|
committer | 2014-10-09 12:36:48 -0700 | |
commit | 52455cbc02d7f480d988ae7cdacc11ad69078c2c (patch) | |
tree | dafb5a53c54a68a9f14837f92ff8ed6ba899ff2c /tests/RTreeTest.cpp | |
parent | 5c481666c9678f43e039ad605457be3854cf8de3 (diff) |
Use BBH reserve hook to preallocate space for tiles.
Before getting too far into changing how SkTileGrid stores its tiles, I figured I'd
better see how much I can tweak out the existing format. Cleverly, that way
any improvements I make by changing the format will look that much less
impressive.
This CL looks like it will be a 5-15% win in time spent recording, with no effect
on playback.
This CL also shrinks the tiles to fit exactly when we're done inserting,
using newly added SkTDArray::shrinkToFit(). It's quite cheap to run (maybe
taking back 1-2% from those 5-15% wins), and means we'll lug around about 15%
fewer bytes in the tile grids. Note though this strategy temporarily uses up to
30% more memory while building the tile grid. For our largest SKPs, that's
maybe 75-100K extra.
BUG=skia:
Review URL: https://codereview.chromium.org/639823005
Diffstat (limited to 'tests/RTreeTest.cpp')
0 files changed, 0 insertions, 0 deletions