diff options
author | 2014-08-21 07:40:42 -0700 | |
---|---|---|
committer | 2014-08-21 07:40:43 -0700 | |
commit | a8d2c4adb8b7ebbcd20da62d80f6641caa0cbfad (patch) | |
tree | 875d909820abcb0e0765fb005950f3896460ea86 /tests | |
parent | 6bf35c21003b8d1c8286c90a53c0b3091f5aa85a (diff) |
Temporarily adjust Matrix.isSimilarity test tolerance on 64-bit ARM devices
BUG=skia:2405
R=halcanary@google.com, jvanverth@google.com, reed@google.com
Author: djsollen@google.com
Review URL: https://codereview.chromium.org/494113002
Diffstat (limited to 'tests')
-rw-r--r-- | tests/MatrixTest.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/MatrixTest.cpp b/tests/MatrixTest.cpp index 9c7a520369..cbec021b40 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 |