Replace constant variables with their values when it saves space.
In practice, the answer today is "it always saves space" but this
isn't necessarily a given. Single-digit values are always smaller,
but if we used $PI enough times, it would eventually tip the balance
back to keeping the constant. (I tested this locally and confirmed
that a few more uses of $PI were enough to preserve a named $PI.)
sksl_binary_size_gpu: 18354 -> 18335 bytes
sksl_binary_size_graphite: 22448 -> 21934 bytes
sksl_binary_size_compute: 245 -> 245 bytes
Change-Id: I2bc5e256ab17ee00f338d87d9e7021cfa5c1457e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/586280
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
9 files changed