commit | 2c2d8ab08c39fad2706895e69dcc9ed1aeb9bb2a | [log] [tgz] |
---|---|---|
author | mtklein <mtklein@chromium.org> | Tue Jan 05 05:06:26 2016 -0800 |
committer | Commit bot <commit-bot@chromium.org> | Tue Jan 05 05:06:26 2016 -0800 |
tree | 918145ceafba91256e6c426b504b3ee8c84e30fe | |
parent | 68bb45ea83c929870c9fc33c8566ae298113ed83 [diff] |
df generation: single allocation with calloc The dfStorage DFData allocation can never fit in its stack space: 5px padding on each side always implies at least a 10x10 DFData allocation, but the stack space only fits 64 DFData. So we've always been spilling to the heap. If we're going to spill to the heap, we might as well allocate/free all our temporary memory in one block, and since we want it zeroed, might as well calloc. So in practice this replaces 1-2 malloc, 1-2 free, and 2 bzeros with 1 calloc and 1 free. BUG=skia:4729 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1544983004 Committed: https://skia.googlesource.com/skia/+/12204d90337656542a42fa0fcccb7bec13af0cce CQ_EXTRA_TRYBOTS=client.skia.android:Test-Android-GCC-Nexus6-GPU-Adreno420-Arm7-Release-Trybot Review URL: https://codereview.chromium.org/1544983004