New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 662558 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug

Blocking:
issue 662559



Sign in to add a comment

XFormTest.BlendScale, XFormTest.verifyIsInvertible fail on arm

Project Member Reported by thakis@chromium.org, Nov 4 2016

Issue description

I figured we should run gfx_unittests on Android (https://codereview.chromium.org/2483493002).

https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/62130/steps/gfx_unittests%20%28with%20patch%29%20on%20Android/logs/XFormTest.verifyIsInvertible


XFormTest.BlendScale (run #1):
[ RUN      ] XFormTest.BlendScale
../../ui/gfx/transform_unittest.cc:773: Failure
Value of: to.matrix().get(1, 1)
  Actual: 0
Expected: t * 3 + 1
Which is: 5.5511151e-17
i: -3
[  FAILED  ] XFormTest.BlendScale (0 ms)
(Looks like this test already does EXPECT_FLOAT_EQ(), but that apparently requires more precision than what we get on arm?)

https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/62130/steps/gfx_unittests%20%28with%20patch%29%20on%20Android/logs/XFormTest.BlendScale
XFormTest.verifyIsInvertible (run #1):
[ RUN      ] XFormTest.verifyIsInvertible
../../ui/gfx/transform_unittest.cc:2066: Failure
Value of: A.IsInvertible()
  Actual: true
Expected: false
[  FAILED  ] XFormTest.verifyIsInvertible (0 ms)
(Probably also some float precision thing)

Enne, can you take a look? This blocks running gfx_unittests on Android.
 
Blocking: 662559

Comment 2 by enne@chromium.org, Nov 8 2016

Sure, I can take a look.  I think we should add more slop to EXPECT_FLOAT_EQ here and not worry too much about it.  5e-17 is close enough to zero for me.  I'm honestly surprised that EXPECT_FLOAT_EQ disagrees.

Comment 4 by enne@chromium.org, Nov 11 2016

Cc: danakj@chromium.org reed@chromium.org
I can fix BlendScale, but IsInvertible is part of Skia's SkMatrix44.  It calculates the determinant, which is -2.2329881363207037e-13 when I ran it through android_n5x_swarming_rel. 1 / det is finite, so Skia says it can be inverted.

I'm not sure what we want to do with close-to-not-invertible matrices.  I'm not sure that this test is really buying that much tbh either.
Project Member

Comment 5 by bugdroid1@chromium.org, Nov 11 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c6ef18f5d02dec16cd8f8413f75e974aadaac043

commit c6ef18f5d02dec16cd8f8413f75e974aadaac043
Author: enne <enne@chromium.org>
Date: Fri Nov 11 21:29:18 2016

Reenable XFormTest.BlendScale on ARM

This changes the numerical calculation to be similar to how it is calculated in
practice to have the same amount of floating point error in both cases.

BUG= 662558 

Review-Url: https://codereview.chromium.org/2495703002
Cr-Commit-Position: refs/heads/master@{#431650}

[modify] https://crrev.com/c6ef18f5d02dec16cd8f8413f75e974aadaac043/ui/gfx/transform_unittest.cc

Comment 6 by thakis@chromium.org, Dec 13 2016

Status: Fixed (was: Assigned)

Sign in to add a comment