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:
parent
e76f1af141
commit
f0907b0cb1
1 changed files with 5 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue