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

Flutter should use Metal instead of OpenGL on iOS #18208

Open
eseidelGoogle opened this Issue Jun 5, 2018 · 11 comments

Comments

Projects
None yet
8 participants
@eseidelGoogle
Copy link
Contributor

eseidelGoogle commented Jun 5, 2018

This is really a Skia bug, but tracking it here since we've gotten a flood of questions about this after Apple's announcement this week of deprecating OpenGL.

My understanding is Skia has an experimental Metal backend, but it would take some work to bring it to production ready.

Skia also already has a Vulkan backend which Flutter uses on Fuchsia, and has historically used on some Android phones (and could use again if there was demand -- it was recently disabled due to lack of demand).

Another advantage of moving to Metal sooner rather than later is that I'm told that Apple's GL drivers appear to be less maintained than they used to be, and Flutter/Skia have seen a resulting up-tick in Apple-specific GL bugs.

@eseidelGoogle

This comment has been minimized.

Copy link
Contributor Author

eseidelGoogle commented Jun 6, 2018

Filed a bug with Skia https://bugs.chromium.org/p/skia/issues/detail?id=8050 and have reached out to the team directly. There is some non-trivial amount of work to do here, but certainly possible.

@amrsolimanmoustafa

This comment has been minimized.

Copy link

amrsolimanmoustafa commented Jun 6, 2018

I am now developing my first mobile app with flutter when i publish it apple store through couple of week what will happen ?

@pvmhoang

This comment has been minimized.

Copy link

pvmhoang commented Jun 6, 2018

I hope Flutter Dev Team will give us the answer about this one soon. I have just started to learning Flutter :(

@gedw99

This comment has been minimized.

Copy link

gedw99 commented Jun 6, 2018

This is great news. Really happy about the transparency the flutter team are giving to events and users concern.

Vulcan and metal are not that dissimilar and there is a project called Molten that allowed Vulcan code to work at runtime on metal apple. I am sure the skis team are on to it.

Anyway this maybe will open the door to 3d scenegraphs but I digress .

@gedw99

This comment has been minimized.

@eseidelGoogle

This comment has been minimized.

Copy link
Contributor Author

eseidelGoogle commented Jun 6, 2018

Apple has not announced any removal of OpenGL support. Flutter works great on iOS, including iOS 12.

@gedw99

This comment has been minimized.

Copy link

gedw99 commented Jun 7, 2018

looks like Molten is already in the build of skia !
https://skia.googlesource.com/skia/+/master/BUILD.gn

SO fantastic ...

@Chozzle

This comment has been minimized.

Copy link

Chozzle commented Jul 27, 2018

I think improvements need to be made quickly on the graphics rendering pipeline. This is the biggest thing holding our company back from developing in flutter. Look at the Hamilton app on an iPhone 6 for an example of unacceptable performance.

@Chozzle

This comment has been minimized.

Copy link

Chozzle commented Aug 8, 2018

Any update on using MoltenVK? Does anyone know if this would allow much 2d performance improvement?

@SAGARSURI

This comment has been minimized.

Copy link

SAGARSURI commented Sep 9, 2018

Even I am eagerly looking for an update on this from the dev team.

@eseidelGoogle

This comment has been minimized.

Copy link
Contributor Author

eseidelGoogle commented Sep 10, 2018

The bug to track is in Skia: https://bugs.chromium.org/p/skia/issues/detail?id=8050. Once Skia has support for Metal, Flutter's Engine can also add support. There likely won't be any updates to this bug in Flutter until the Skia issue is resolved. We speak with Skia team members regularly and they're aware of the ask.

Flutter works great on iOS today. However, we expect Flutter may work even better on iOS with Metal in the long-term (as I'm told OpenGL drivers on iOS are less well maintained than Metal ones).

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