-
Notifications
You must be signed in to change notification settings - Fork 77
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
Make flutter engine independent of GLFW #90
Conversation
@gliheng Any thoughts on the current state? |
LGTM. dvc94ch is working on winit port. I fear you guys work may conflict somehow. |
I can get this PR finished over the next few days, and then it's probably best for @dvc94ch to refactor his changes, then we can keep both the current GLFW code and the new winit renderer (incase people have some very specific reason for using GLFW) |
This makes things easier, I can refactor my changes... |
@csnewman I opened a PR against your branch with some improvements. Things that still are missing:
|
@dvc94ch Thanks for that. I've added a small comment. Otherwise looks great. I have mostly rewrote the window plugin, just need to push it. And the texture loader should be easy enough for me to finish off today. |
@gliheng The refactor is now complete. Everything seems to be working as it was before. I plan on a few follow up PRs with updating to the latest flutter engine features. |
That's a huge refactor. Thanks for your great work! |
As a follow up to #88, I propose refactoring the library into:
flutter-engine-sys: the ffi code
flutter-engine: codec, channels, pointer events, tasks etc (i.e. wrapper around sys crate)
flutter-engine-plugins: text-input etc, each plugin could be a feature flag
flutter-engine-glfw: current logic around glfw rendering
This means that the flutter-engine crate is no longer dependent on opengl etc, or glfw, and can be used as an independent library in the following manor:
If in the future flutter gets alternative renderers, such as Vulkan, we can break down the FlutterEngineHandler into multiple traits, or use a feature flag.
TaskRunner
are now an independent concept, meaning if flutter adds extra task runners in the future, the logic should be reusable.