Index: tests/MatrixTest.cpp |
diff --git a/tests/MatrixTest.cpp b/tests/MatrixTest.cpp |
index 9c7a5203695e239dc1c9dc6d971405d3ce29dad0..cbec021b405273c2301a3629c790906f11d6b5d3 100644 |
--- a/tests/MatrixTest.cpp |
+++ b/tests/MatrixTest.cpp |
@@ -320,7 +320,13 @@ static void test_matrix_is_similarity(skiatest::Reporter* reporter) { |
for (int angle = 0; angle < 360; ++angle) { |
mat.reset(); |
mat.setRotate(SkIntToScalar(angle)); |
+#ifndef SK_CPU_ARM64 |
REPORTER_ASSERT(reporter, mat.isSimilarity()); |
+#else |
+ // 64-bit ARM devices built with -O2 and -ffp-contract=fast have a loss |
+ // of precision and require that we have a higher tolerance |
+ REPORTER_ASSERT(reporter, mat.isSimilarity(SK_ScalarNearlyZero + 0.00010113f)); |
+#endif |
} |
// see if there are any accumulated precision issues |