Factor out indexed-swizzle rewrite logic to transform/.

This will allow us to reuse it in the RP code generator.

Change-Id: I0034f021c96261f236af8bc35498a6f29a984896
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/656246
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
6 files changed