Skip to content

Difference between Flutter_wayland and flutter-pi #46

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

Closed
limbouser opened this issue Mar 18, 2020 · 3 comments
Closed

Difference between Flutter_wayland and flutter-pi #46

limbouser opened this issue Mar 18, 2020 · 3 comments

Comments

@limbouser
Copy link

Apart from the fact that one is designed for Pi and other for a 64bit machine, what is the difference between flutter_wayland and flutter-pi?

Does flutter-pi run on a machine if vc4graphics isn't available?

@ardera
Copy link
Owner

ardera commented Mar 19, 2020

The difference is basically an additional layer of abstraction. For flutter_wayland, it looks like this:
DRM (linux kernel) <-- wayland <-- flutter_wayland <-- flutter

For flutter-pi, it looks like this:
DRM (linux kernel) <-- flutter-pi <-- flutter

So, basically, for flutter_wayland, there's an additional layer between the linux kernel and flutter_wayland, while flutter-pi communicates with the linux kernel directly.

There's some advantages to this (flutter-pi's) approach, but also some drawbacks.

Advantages:

  • resources. It's just plain wasteful to start a whole wayland server for a single, full-screen application.
  • faster (in general, and also startup) because of less overhead.
  • easier to implement platform-specific stuff. For example, in the past, the Raspberry Pi used a different graphics stack. IIRC, you could only get hardware acceleration for OpenGL by using that proprietary graphics stack. If you want to make flutter-pi compatible with some platform that still uses such a non-standard grahpics stack, you could just modify the init_graphics procedure of flutter-pi to get it to work. It's not that easy with flutter_wayland though, as you'd have to update wayland for that.

Disadvantages:

  • wayland does a lot of stuff other than graphics. flutter_pi has to implement that stuff by itself. For example, there's no way to just change the speed of your mouse for flutter-pi, because there's no layer of abstraction in flutter-pi that'd implement such configuration. Keyboard layouts is similiar, that's why there's this limitation to the text input from the controlling console (see readme).
  • you can't run flutter-pi alongside your x- or wayland-server.

Does flutter-pi run on a machine if vc4graphics isn't available?

flutter-pi uses the standard linux graphics stack. So if hardware acceleration of your machine works with the standard linux graphics stack, it should run. If it uses a different graphics stack, you'd need to apply some hacks.

@limbouser
Copy link
Author

Doesn't Wayland alone exist? Can I run flutter-pi somewhere if I can't afford to have vc4-drm? What changes wouldnI have to make to make this thing work on plain Wayland?

@ardera
Copy link
Owner

ardera commented Mar 30, 2020

Doesn't Wayland alone exist?

I don't understand what you mean by this.

Can I run flutter-pi somewhere if I can't afford to have vc4-drm?

As I wrote above, if it has working DRM support, flutter-pi should run. That's untested though. I don't understand what you mean by "afford to have vc4-drm".

What changes wouldnI have to make to make this thing work on plain Wayland?

The sole purpose of flutter-pi is to run without X or wayland, so you could probably discard most of the flutter-pi.c, console_keyboard.c files. No idea what specific changes would be necessary though.

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

No branches or pull requests

2 participants