Skip to content
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

Wayland backend #2

Open
rmader opened this issue Aug 30, 2019 · 1 comment
Open

Wayland backend #2

rmader opened this issue Aug 30, 2019 · 1 comment

Comments

@rmader
Copy link

rmader commented Aug 30, 2019

I recently browsed a bit through the code and would like to leave two notes about the wayland backend:

  1. You use subsurface.place_below. This was not supported by Mutter (Gnome Shell) until very recently, but it just landed and will be supported in 3.34 (https://gitlab.gnome.org/GNOME/mutter/merge_requests/664)
  2. It might be possible to simplify the code quite a bit by making use of wp_viewporter (https://gitlab.freedesktop.org/wayland/wayland-protocols/blob/master/stable/viewporter/viewporter.xml). It allows to select what part of a buffer you would like to display, so you can e.g. paint the whole website into a buffer (of a subsurface) and then simply move the viewport around. Support for that landed in Mutter 3.32, but we need https://gitlab.gnome.org/GNOME/mutter/merge_requests/763 to land before it really works for this use case (I just wrote a test client and it works really well).

Edit: I created a MR for the demo client at https://gitlab.freedesktop.org/wayland/weston/merge_requests/259

Update:

After some discussion with Wayland and Mutter devs, we concluded that we don't need any additions for viewport scrolling and can use it simply with wl_surface.damage_buffer as long as EGL/DMABUF buffers are used, since we don't do extra copies then (with SHM buffers it would cause extra copies).

So since Webrender on Wayland already uses EGL, using wp_viewporter should be quite straight forward.

@Darkspirit
Copy link

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