Watch
1
0
Fork
You've already forked smithay
0

backend: expose dmabuf flags

Expose the stored DmabufFlags so compositors can apply their own buffer policy.

Signed-off-by: Felipe Machado <felipemmachado266@gmail.com>
This commit is contained in:
Felipe Machado 2026-07-14 14:32:05 -03:00 • committed by Victoria Brekenfeld
commit f0907b0cb1

View file

@ -230,6 +230,11 @@ impl Dmabuf {
self.0.modifier != Modifier::Invalid && self.0.modifier != Modifier::Linear
}
/// Returns the flags stored on this buffer without interpreting them.
pub fn flags(&self) -> DmabufFlags {
self.0.flags
}
/// Returns if the buffer is stored inverted on the y-axis
pub fn y_inverted(&self) -> bool {
self.0.flags.contains(DmabufFlags::Y_INVERT)