Pass in premul constant color for blend4f color filter on SkVM
Pass in premul constant color for blend4f color filter on SkVM

Fix-forward from visual regression added in https://skia-review.googlesource.com/c/skia/+/566445.

The SkVM flow operated on a premul color that was stored in SkColor4f
but premul'ed as part of the alpha type passed into
SkColorSpaceXformSteps.

In this CL, map_color is templated to take an alpha type and defaults
to premul. This is included in the return type, so the explicit premuls
that most usages had are then removed. The SkVM flow is updated to
specifically copy back out to a lying SkColor4f to fit its uniform API.

I opted to keep the stored constant color as unpremul so that alpha
wasn't multiplied in until the end. This is why map_color remains
templated, so it can be used in SkColorFilters::Blend factory.

Bug: skia:13637
Change-Id: I82475c42a7cfcff226d8a5c8cb724bbe7632e97a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/569316
Reviewed-by: Brian Osman <794c0b5534edf5601d88e1d41975d0262da12894@google.com>
Commit-Queue: Michael Ludwig <cb1f3dd24de0f0b611b26bc28bec758a551d9b7d@google.com>

google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia