[skif] Consolidate mapping/layerspace code

Removes the static functions that were used by both Mapping and
LayerSpace<T>, and instead just has LayerSpace<T> use Mapping's
functionality.

Adjusts some of the ceil/floor functions to match how rectangles are
rounded (i.e. include the rounding epsilon).

Improves mapSize to be more correct when the transform is not just a
scale/translate matrix.

Bug: skia:9282
Change-Id: I1116cae9d7d3a486d601f985c2c779259bb2acda
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/706438
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2 files changed