DescriptionDeparameterize SkVarAlloc.
SkRecord performance is not sensitive to these values, so we can cut some
storage. This rearranges the space-remaining logic to use a count of bytes
left rather than a pointer to the end, cutting memory usage a little more.
An SkVarAlloc used to weigh 20 or 32 bytes which now becomes 16 or 24.
I think if I think about it a bit more I can trim off that Block* too,
getting us to 12 or 16 bytes.
Because we now just always grow by doubling, this CL switches from storing
fSmallest to its log base 2. This has the nice effect of never having to worry
about it overflowing, and means we can probably squeeze it down into a byte
if we want, even 6 bits.
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/bc415389855888af5a1282ca4b6bee30afa3d69d
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu12-ShuttleA-GTX660-x86-Debug-Trybot
Committed: https://skia.googlesource.com/skia/+/f2950b1c4538fa638a594af6beacd3d1434eb74d
Patch Set 1 #Patch Set 2 : might as well handle overflow sensibly #Patch Set 3 : that's not right, undo #Patch Set 4 : store lgN #Patch Set 5 : try-zero #Patch Set 6 : remaining #Patch Set 7 : fixes: update unit test, remove unused header, start at 16 bytes #
Messages
Total messages: 11 (3 generated)
|