Skip to content

Wayland backendΒ #2

@rmader

Description

@rmader

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions