Replace salting process in SkSLInliner with a symbol table check.

Ideally, we wouldn't need a counter at all here, and we could just rely
on the symbol table to check for name collisions. Unfortunately, this
fails in practice on a couple of tests, because we don't construct
programs in a strict top-to-bottom order--particularly when inlining.
However, by checking the symbol table before using a name, we can at
least solve cases where the inliner reuses a name that was taken in a
previous pass, which was why salt was originally added. This makes the
generated code much easier to read.

Change-Id: Ib69611c8df457fbd03b31e52158113ad4a8735d5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314277
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
5 files changed