clamp after color pipeline when dst is normalized

Most code working with unorm values doesn't expect to see out-of-gamut
colors, but unorms _can_ store some out-of-gamut colors when
premultiplied and alpha is <1.

Clamping after the color (= shader + color filter) pipeline prevents us
from creating those values.  This CL does appear to fix the problem we
were seeing with xfermodes2 in the narrow config.

I've kept scalepixels_unpremul working by using our old trick,
remembering that unpremul->unpremul involves the same steps as
premul->opaque.  We'll take the unpremul pixels, pun them to premul to
avoid data loss, scale them up, and then avoid unpremul on the way out
by punning the surface as opaque.  It all kind of just barely hangs
together.

Bug: chromium:867813
Change-Id: I677d00ecfe4692ba7799ae963d8b8d1ccd4b00ac
Reviewed-on: https://skia-review.googlesource.com/152200
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-on: https://skia-review.googlesource.com/c/164624
2 files changed