Factor out redundant code for compiling GLSL/Metal/SPIR-V/CPP/H files.

Change-Id: I4eb9fb50e645f503d71cd6423bfc38076a7c2119
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/336777
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
1 file changed