Add guard-rails to Constructor constant-value fetchers.

Previously, we blindly trusted that the scalars inside a compile-time-
constant vector Constructor would be of matching type. (e.g. the scalars
inside a half3 constructor would always be of type half) This *should*
be true if we've done all our type-checking homework correctly, but we
would ABORT if anything went wrong. Now, we are less trusting and will
actually verify types and do the right thing if the scalar inside turns
out to be an int somehow. In practice, there's no real downside to
doing the conservative type-checks.

Change-Id: If0a255eb96a0ccfec7d0a261caad542cae93d078
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/353556
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2 files changed