Add SkMatrixPriv::NearlyAffine.

This allows us to check with a tolerance if perspective matrices are
nearly affine, and then make affine approximations with little
loss of visual quality.

Bug: skia:13940
Change-Id: I5c4f230ddd3872f872a0ee08c3ddf8c2ad5239ba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/633057
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2 files changed