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
[fuchsia] Ensure we do not initialize nan RoundedRectangles #13971
Conversation
da83110
to
f248484
Compare
Also initializes physical shape layer vars to empty.
f248484
to
b002bc9
Compare
@@ -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())) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Also initializes physical shape layer vars to empty.