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
1 file changed