Reclaim heap space from mangled-names in Variables.
At http://review.skia.org/693800, I added a mangled-name field to
SkSL variables. This new field led to a pretty substantial
increase in memory usage: http://screen/43aFa5wLVe7LnMR
This CL attempts to reclaim this space by only adding the new
field when it's necessary. We already used a similar technique
with InterfaceBlock-associated variables, so I've repurposed the
code to support mangled-name variables as well.
I've also reordered the fields to minimize padding between fields.
In local tests, these changes seem to have been effective at winning
back memory.
Change-Id: I6e50bc7cc44363760dfc7e7fcec96e1a57594319
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/695305
Reviewed-by: Arman Uguray <armansito@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
5 files changed