Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Remove ~SurfaceFrame#32915

Merged
dnfield merged 1 commit intoflutter:mainfrom
dnfield:surf_frame_dtor
Apr 28, 2022
Merged

Remove ~SurfaceFrame#32915
dnfield merged 1 commit intoflutter:mainfrom
dnfield:surf_frame_dtor

Conversation

@dnfield
Copy link
Contributor

@dnfield dnfield commented Apr 26, 2022

In all implementations except the impeller implementation, there is an early return when the SkCanvas is null.

In impeller, it doesn't necessarily make sense to check the canvas since it's an SkCanvas (even though it's just an implementation of SkCanvas rather than a real Skia implementation).

Fixes flutter/flutter#102516

However, with this patch, impeller is also not rendering anything in new gallery for me locally...

@dnfield
Copy link
Contributor Author

dnfield commented Apr 26, 2022

This patch is breaking rendering in impeller. Need to look into this some more.

@dnfield dnfield reopened this Apr 26, 2022
@dnfield
Copy link
Contributor Author

dnfield commented Apr 26, 2022

I suspect flutter/impeller#143 broke rendering, but had to revert flutter/impeller#145 to verify so it could be either or some combination of both. @bdero fyi

@dnfield
Copy link
Contributor Author

dnfield commented Apr 26, 2022

These were added in https://github.com/flutter/engine/pull/3282/files#diff-c5ad14ed18025fdd922d2c53c4f7709642981eac478b0b44057466de136310a9R22 and seem to never have been used for anything. My best guess is that it was missed in reviewing a relatively large patch.

@zanderso
Copy link
Member

@dnfield is this still needed?

Copy link
Contributor

@chinmaygarde chinmaygarde left a comment

Choose a reason for hiding this comment

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

Not sure what this fixes but invoking a callback from a destructor with a reference to itself as an argument is pretty sus. LGTM.

@dnfield dnfield added the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label Apr 28, 2022
@dnfield
Copy link
Contributor Author

dnfield commented Apr 28, 2022

This was causing a crash when impeller was doing something broken at one point. I still think we should remove it for the reasons Chinmay says, and because all implementations of the callback simply early return false when they get called this way.

@fluttergithubbot
Copy link
Contributor

This pull request is not suitable for automatic merging in its current state.

@fluttergithubbot fluttergithubbot removed the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label Apr 28, 2022
@dnfield
Copy link
Contributor Author

dnfield commented Apr 28, 2022

Cirrus got confused because I closed this PR at one point - rerun here, not sure if it'll update in the UI: https://cirrus-ci.com/task/5227988034781184

@dnfield dnfield merged commit 74aa1a8 into flutter:main Apr 28, 2022
@bdero
Copy link
Contributor

bdero commented Apr 28, 2022

This fixes a crash that happens whenever something in Impeller decides to fail a frame render (by returning false in a render callback). We'll most likely run into cases where a frame or two will fail to render as a failsafe (whether due to a nuanced bug or intentionally), so this is an important fix IMO!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Apps crash after first frame with impeller enabled

5 participants