remove the last vestiges of SkMScalar

Change-Id: I2a91c73dd6c372a450b5f42dbe184c368e260a45
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265597
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
This commit is contained in:
Mike Reed 2020-01-21 15:31:02 -05:00 committed by Skia Commit-Bot
parent 55f6fc3064
commit 38380dfe85
4 changed files with 7 additions and 11 deletions

View File

@ -360,12 +360,14 @@ public:
this->mapScalars(vec, vec);
}
#ifdef SK_SUPPORT_LEGACY_MSCALAR
inline void mapMScalars(const SkScalar src[4], SkScalar dst[4]) const {
this->mapScalars(src, dst);
}
inline void mapMScalars(SkScalar vec[4]) const {
this->mapMScalars(vec, vec);
}
#endif
friend SkVector4 operator*(const SkMatrix44& m, const SkVector4& src) {
SkVector4 dst;

View File

@ -131,7 +131,7 @@ SkV4 SkM44::map(float x, float y, float z, float w) const {
/** We always perform the calculation in doubles, to avoid prematurely losing
precision along the way. This relies on the compiler automatically
promoting our SkMScalar values to double (if needed).
promoting our SkScalar values to double (if needed).
*/
double SkM44::determinant() const {
double a00 = fMat[0];

View File

@ -434,7 +434,7 @@ void SkMatrix44::setConcat(const SkMatrix44& a, const SkMatrix44& b) {
/** We always perform the calculation in doubles, to avoid prematurely losing
precision along the way. This relies on the compiler automatically
promoting our SkMScalar values to double (if needed).
promoting our SkScalar values to double (if needed).
*/
double SkMatrix44::determinant() const {
if (this->isIdentity()) {

View File

@ -18,12 +18,6 @@ static bool nearly_equal_double(double a, double b) {
return diff <= tolerance;
}
static bool nearly_equal_mscalar(SkScalar a, SkScalar b) {
const SkScalar tolerance = SK_Scalar1 / 200000;
return SkTAbs<SkScalar>(a - b) <= tolerance;
}
static bool nearly_equal_scalar(SkScalar a, SkScalar b) {
const SkScalar tolerance = SK_Scalar1 / 200000;
return SkScalarAbs(a - b) <= tolerance;
@ -58,7 +52,7 @@ template <typename T> void assert16(skiatest::Reporter* reporter, const T data[]
static bool nearly_equal(const SkMatrix44& a, const SkMatrix44& b) {
for (int i = 0; i < 4; ++i) {
for (int j = 0; j < 4; ++j) {
if (!nearly_equal_mscalar(a.get(i, j), b.get(i, j))) {
if (!SkScalarNearlyEqual(a.get(i, j), b.get(i, j))) {
SkDebugf("not equal %g %g\n", a.get(i, j), b.get(i, j));
return false;
}
@ -203,7 +197,7 @@ static void test_map2(skiatest::Reporter* reporter, const SkMatrix44& mat) {
}
mat.map2(src2, 1, dstA);
mat.mapMScalars(src4, dstB);
mat.mapScalars(src4, dstB);
for (int i = 0; i < 4; ++i) {
REPORTER_ASSERT(reporter, dstA[i] == dstB[i]);
@ -804,7 +798,7 @@ static void test_preserves_2d_axis_alignment(skiatest::Reporter* reporter) {
test(true, reporter, transform);
}
// just want to exercise the various converters for MScalar
// just want to exercise the various converters for Scalar
static void test_toint(skiatest::Reporter* reporter) {
SkMatrix44 mat;
mat.setScale(3, 3, 3);