relax asserts to what we'd clamp to

At head we're asserting that our post-blend color is premul and alpha is in range
[0,1], which I think is still something we could assert if we were
dealing with real numbers.  But we've got floats, with rounding,
precision loss, etc, and these asserts keep triggering oh so very
slightly, usually by 1 ulp.

We're using these asserts to check that we can skip a clamp to [0,1]
across all channels (notably, not r,g,b to alpha) for sane conversion to
packed fixed point.  So first thing to try is relaxing the asserts to
exactly what they're enforcing, from asserting the color is premul and
in-gamut to just every channel is in [0,1].

I've never seen one of these small errors show up by the time we've
convert to fixed point to store the pixel, so perhaps we can move these
checks there instead somehow?

Change-Id: I2062dad8f9477d7e1a72063dc55fe185c7233384
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270612
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
1 file changed