Skip to content

Conversation

@dnfield
Copy link
Contributor

@dnfield dnfield commented Jul 26, 2019

The new implementation results in a non-finite rect when using very small values for the rect bounds. I'm a bit surprised by this - 1.7976931348623157e+308 - -1.7976931348623157e+308 is evaluating to double.infinity, which seems like a bug but I might be missing some finer point of IEEE 754.

Added a test to make sure that when we reland the optimized version we don't regress this again.

@dnfield dnfield requested review from flar and jonahwilliams July 26, 2019 23:50
@fluttergithubbot fluttergithubbot added the framework flutter/packages/flutter repository. See also f: labels. label Jul 26, 2019
@dnfield
Copy link
Contributor Author

dnfield commented Jul 27, 2019

(It turns out the addition is correct - we just need to handle cases like this in the optimized method)

@dnfield dnfield merged commit bf3a907 into flutter:master Jul 27, 2019
@flar
Copy link
Contributor

flar commented Jul 29, 2019

What was the use case where this happened?

@dnfield
Copy link
Contributor Author

dnfield commented Jul 29, 2019

Test on an google internal app - I'll try to get you a reproduction.

Basically, the semantics rect comes out with these values and wants to get transformed and then fails.

johnsonmh pushed a commit to johnsonmh/flutter that referenced this pull request Jul 30, 2019
* Revert "Optimize the transformRect and transformPoint methods in matrix_utils. (flutter#36396)"

This reverts commit 9946f7c.

* add test
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants