Abstraction over input and output backends #746
Replies: 1 comment 2 replies
-
The general problem I see with this suggestions is, that the udev-backend pretty much falls out of line. Abstracting over that part of the backend leads to either:
So while I am generally in favour of building some backend abstraction, I don't think we should attempt to make the udev-backend neatly fit into that. I would generally focus on building some common abstractions mostly for window-backed backends at first and adapt what makes sense for udev afterwards.
Yes absolutely. But I think we are half the way already there here.
Yes, but we might wanna look in the nvidia situation first and then decide, if we want to keep nvidia compatibility for this abstraction (of course all lower level parts would still work) or mostly focus on mesa to upheld this design goal.
Outputs is the most interesting part here, imo. If we find a good abstraction for outputs, we can use that for udev and for better multi-window support in our windowed backends.
As stated above, I am against doing this given the current state of the discussion.
Configuration might also be a non-goal of the abstraction, no? If additional hardware is plugged, output-events should be generated. If additional windows are created, the same thing holds true. But I would for now keep the way to trigger a hardware-scan or create a window specific to a given backend. (We can always introduce a
For udev the interesting part here is scan-out. If we abstract over outputs, how can a user receive the scan-out
If we support testing buffers, we can relatively easily do that. However we need to figure out how this will fit together with @cmeissl's DrmPlaneRenderer. I guess that more complicated and advanced use-case might not be covered by a simpler backend-abstraction, but it would be nice, if we find a way. |
Beta Was this translation helpful? Give feedback.
-
Currently writing a compositor requires wiring up a backend to the compositor. Compositor developers may want to also have more than just udev, so that a compositor could be more easily tested inside a window.
Right now to manage these backends, compositor developers need to write code to link udev and possibly a windowed backend or two up to the compositor. In Anvil, the udev backend is about 1000 lines, and then winit and x11 are about 300 lines each. The future proposed Wayland backend will further increase this amount.
The common api proposal would provide something like the following:
Questions:
cc @PolyMeilex, @cmeissl, @Drakulix
Beta Was this translation helpful? Give feedback.
All reactions