Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fuchsia] Ensure we do not initialize nan RoundedRectangles #13971

Merged
merged 1 commit into from Nov 22, 2019

Conversation

iskakaushik
Copy link
Contributor

Also initializes physical shape layer vars to empty.

Also initializes physical shape layer vars to empty.
@iskakaushik iskakaushik merged commit af2c53a into flutter:master Nov 22, 2019
@@ -71,6 +71,13 @@ void SceneUpdateContext::CreateFrame(scenic::EntityNode entity_node,
if (rrect.isEmpty())
return;

// isEmpty should account for this, but we are adding these experimental
// checks to validate if this is the root cause for b/144933519.
if (std::isnan(rrect.width()) || std::isnan(rrect.height())) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rrect.rect().isFinite() ought to do the same thing. Also, shouldn't this check happen before setting the clip planes? Might be a worthwhile check either way as this input comes from the framework and there doesn't seem to be any validation on the results of the rrect as it is constructed from a canvas path. Maybe the path wasn't closed or was reset before being given to the engine. Not sure.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rrect.isEmpty should already account for this. Our suspicion is that is might not be the working as intended on some devices. I added some additional logs to be 100% sure that this is not the case. I am continuing to investigate the above issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants