linux-dmabuf: send better per-surface feedback
This commit leverages the new wlr_scene helper to send custom feedback per surface rather than using the same default feedback for every surface. This should allow direct scanout to work more reliably with multiple outputs for example.
This commit is contained in:
parent
80ced04f68
commit
28dcd8320a
@ -129,6 +129,8 @@ pub fn init(self: *Self) !void {
|
|||||||
const scene = try wlr.Scene.create();
|
const scene = try wlr.Scene.create();
|
||||||
errdefer scene.tree.node.destroy();
|
errdefer scene.tree.node.destroy();
|
||||||
|
|
||||||
|
scene.setLinuxDmabufV1(server.linux_dmabuf);
|
||||||
|
|
||||||
const interactive_content = try scene.tree.createSceneTree();
|
const interactive_content = try scene.tree.createSceneTree();
|
||||||
const drag_icons = try scene.tree.createSceneTree();
|
const drag_icons = try scene.tree.createSceneTree();
|
||||||
const hidden_tree = try scene.tree.createSceneTree();
|
const hidden_tree = try scene.tree.createSceneTree();
|
||||||
|
@ -51,6 +51,7 @@ backend: *wlr.Backend,
|
|||||||
session: ?*wlr.Session,
|
session: ?*wlr.Session,
|
||||||
|
|
||||||
renderer: *wlr.Renderer,
|
renderer: *wlr.Renderer,
|
||||||
|
linux_dmabuf: *wlr.LinuxDmabufV1,
|
||||||
allocator: *wlr.Allocator,
|
allocator: *wlr.Allocator,
|
||||||
|
|
||||||
xdg_shell: *wlr.XdgShell,
|
xdg_shell: *wlr.XdgShell,
|
||||||
@ -98,7 +99,7 @@ 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) {
|
||||||
_ = try wlr.LinuxDmabufV1.createWithRenderer(self.wl_server, 4, self.renderer);
|
self.linux_dmabuf = try wlr.LinuxDmabufV1.createWithRenderer(self.wl_server, 4, self.renderer);
|
||||||
}
|
}
|
||||||
|
|
||||||
self.allocator = try wlr.Allocator.autocreate(self.backend, self.renderer);
|
self.allocator = try wlr.Allocator.autocreate(self.backend, self.renderer);
|
||||||
|
Loading…
Reference in New Issue
Block a user