river: re-add wl_drm support for now

It seems to be a bit too early to drop support for this legacy protocol.

Xwayland apparently still relies on it for hardware acceleration as do
fairly recent mesa versions still in widespread use.
This commit is contained in:
Isaac Freund
2024-01-06 19:23:55 -06:00
parent 3605a46bb5
commit afbc84c994
2 changed files with 7 additions and 1 deletions

View File

@ -102,6 +102,12 @@ pub fn init(self: *Self) !void {
try self.renderer.initWlShm(self.wl_server); try self.renderer.initWlShm(self.wl_server);
if (self.renderer.getDmabufFormats() != null and self.renderer.getDrmFd() >= 0) { if (self.renderer.getDmabufFormats() != null and self.renderer.getDrmFd() >= 0) {
// wl_drm is a legacy interface and all clients should switch to linux_dmabuf.
// However, enough widely used clients still rely on wl_drm that the pragmatic option
// is to keep it around for the near future.
// TODO remove wl_drm support
_ = try wlr.Drm.create(self.wl_server, self.renderer);
self.linux_dmabuf = try wlr.LinuxDmabufV1.createWithRenderer(self.wl_server, 4, self.renderer); self.linux_dmabuf = try wlr.LinuxDmabufV1.createWithRenderer(self.wl_server, 4, self.renderer);
} }