PM/UPM conversion improvements

Snap input values to N / 255 before doing PM/UPM conversions, and add
a new round-to-nearest conversion pair. With the pre-snapping, that
pair is chosen by (almost?) every GPU we have. This now lets us round
trip perfectly on Mali GPUs (which were falling back to SW before).

Bug: skia:
Change-Id: I0cebf1382e1c829aedfef4ec1614d7fa980057b5
Reviewed-on: https://skia-review.googlesource.com/11520
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2 files changed