tiny.windowing.WaylandDmabuf
Defined in tiny.windowing.
Presents buffers another device rendered on a Wayland window, as dma-bufs with explicit synchronization.
API (9)
Actions
Public operations.
destroyTimelinefeedback: The compositor's latest complete feedback for the window's surface.frameReady: Whether the compositor has asked for the next frame.importBufferimportTimelinepresent: Commitsframe.releaseBufferversion: Thezwp_linux_dmabuf_v1version the window bound.
Fields and members
Public fields and members.
Source
Source: lib/windowing/src/wayland/window/root.zig:426
zig
/// Presents buffers another device rendered on a Wayland window, as dma-bufs with explicit/// synchronization. `Window.waylandDmabuf` hands one out when the compositor offers both/// protocols. It stays valid as long as the window.pub const DmabufSurface = struct { backend: *WaylandBackend, fn explicit(self: DmabufSurface) *present_dmabuf.Dmabuf { return &self.backend.dmabuf.?; } /// The `zwp_linux_dmabuf_v1` version the window bound. pub fn version(self: DmabufSurface) u32 { return self.explicit().version(); } /// The compositor's latest complete feedback for the window's surface. pub fn feedback(self: DmabufSurface) ?*const present_dmabuf.Feedback { return self.explicit().currentFeedback(); } pub fn importBuffer(self: DmabufSurface, desc: present_dmabuf.BufferDesc) present_dmabuf.Error!present_dmabuf.Buffer { return self.explicit().importBuffer(desc); } pub fn releaseBuffer(self: DmabufSurface, buffer: present_dmabuf.Buffer) void { self.explicit().releaseBuffer(buffer); } pub fn importTimeline(self: DmabufSurface, fd: sys.fd.Descriptor) present_dmabuf.Error!present_dmabuf.Timeline { return self.explicit().importTimeline(fd); } pub fn destroyTimeline(self: DmabufSurface, timeline: present_dmabuf.Timeline) void { self.explicit().destroyTimeline(timeline); } /// Whether the compositor has asked for the next frame. pub fn frameReady(self: DmabufSurface) bool { return self.backend.presenter.frameReady(); } /// Commits `frame`. See `Presenter.presentDmabuf`. pub fn present(self: DmabufSurface, frame: present_dmabuf.Frame) present_dmabuf.PresentError!?u64 { const target = self.backend.toplevel.target() orelse return error.Unexpected; return self.backend.presenter.presentDmabuf(target, self.explicit(), frame); }};Source: lib/windowing/src/root.zig:104
zig
pub const WaylandDmabuf = wayland.DmabufSurface;Audit
| Definitions | 9 |
|---|---|
| Public names | 9 |
| Members | 1 |
| Version | 26.7.0 |
| Revision | daab053ee433 |