Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Issue 639823005: Use BBH reserve hook to preallocate space for tiles. (Closed)

Created:
6 years, 2 months ago by mtklein_C
Modified:
6 years, 2 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Project:
skia
Visibility:
Public.

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 CQ_EXTRA_TRYBOTS=tryserver.skia:Canary-Chrome-Ubuntu13.10-Ninja-x86_64-ToT-Trybot Committed: https://skia.googlesource.com/skia/+/092dab98220110e7244ccbbb851efa8ad621ab88

Patch Set 1 #

Patch Set 2 : / #

Patch Set 3 : assert -> early check #

Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -0 lines) Patch
M include/core/SkTDArray.h View 1 chunk +5 lines, -0 lines 0 comments Download
M src/core/SkTileGrid.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/core/SkTileGrid.cpp View 1 2 1 chunk +27 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (4 generated)
mtklein
6 years, 2 months ago (2014-10-09 19:00:38 UTC) #3
reed1
lgtm
6 years, 2 months ago (2014-10-09 19:08:04 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/639823005/80001
6 years, 2 months ago (2014-10-09 19:09:16 UTC) #6
commit-bot: I haz the power
Committed patchset #2 (id:80001) as 52455cbc02d7f480d988ae7cdacc11ad69078c2c
6 years, 2 months ago (2014-10-09 19:37:04 UTC) #7
mtklein
A revert of this CL (patchset #2 id:80001) has been created in https://codereview.chromium.org/642933002/ by mtklein@google.com. ...
6 years, 2 months ago (2014-10-09 20:54:41 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/639823005/190001
6 years, 2 months ago (2014-10-09 23:49:17 UTC) #10
commit-bot: I haz the power
6 years, 2 months ago (2014-10-10 01:22:45 UTC) #11
Message was sent while issue was closed.
Committed patchset #3 (id:190001) as 092dab98220110e7244ccbbb851efa8ad621ab88

Powered by Google App Engine
This is Rietveld 408576698