diff options
author | 2014-10-09 13:55:20 -0700 | |
---|---|---|
committer | 2014-10-09 13:55:20 -0700 | |
commit | 7062a262e27d89411a7b6bcc0162d230a2b2e36c (patch) | |
tree | e3418068986c0b360799f58e2e9df88e3874eba9 /include/core/SkTDArray.h | |
parent | d9aa218e8152bb77dfa2efeb8843b61993e0dc56 (diff) |
Revert of Use BBH reserve hook to preallocate space for tiles. (patchset #2 id:80001 of https://codereview.chromium.org/639823005/)
Reason for revert:
failed assertion "fXTiles * fYTiles != 0"
Original issue's description:
> 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:
>
> Committed: https://skia.googlesource.com/skia/+/52455cbc02d7f480d988ae7cdacc11ad69078c2c
TBR=reed@google.com,robertphillips@google.com,mtklein@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/642933002
Diffstat (limited to 'include/core/SkTDArray.h')
-rw-r--r-- | include/core/SkTDArray.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/include/core/SkTDArray.h b/include/core/SkTDArray.h index 8e8b4923e3..92f297c31a 100644 --- a/include/core/SkTDArray.h +++ b/include/core/SkTDArray.h @@ -347,11 +347,6 @@ public: } #endif - void shrinkToFit() { - fReserve = fCount; - fArray = (T*)sk_realloc_throw(fArray, fReserve * sizeof(T)); - } - private: #ifdef SK_DEBUG enum { |