Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Unified Diff: tests/MatrixTest.cpp

Issue 494113002: Temporarily adjust Matrix.isSimilarity test tolerance on 64-bit ARM devices (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/common_conditions.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « gyp/common_conditions.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698