Improve computeMatrices singular matrix handling.

The existing singular matrix detection in computeMatrices is sufficient
but not necessary. Since compute matrices is already doing a QR
decomposition, use that to determine singularity instead. This is both
faster and more accurate than the previous method for the common case.

BUG=https://bugzilla.mozilla.org/show_bug.cgi?id=1305085

Change-Id: Iccef8368527b45e4eb565eddbebbbcf41ca66a2c
Reviewed-on: https://skia-review.googlesource.com/20054
Reviewed-by: Lee Salzman <lsalzman@mozilla.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2 files changed