dmabuf: add PlaneVec
This commit is contained in:
parent
3e4bed66b0
commit
d022d96fbf
9 changed files with 42 additions and 23 deletions
|
|
@ -1,4 +1,9 @@
|
|||
use {crate::format::Format, std::rc::Rc, uapi::OwnedFd};
|
||||
use {
|
||||
crate::{format::Format, video::Modifier},
|
||||
arrayvec::ArrayVec,
|
||||
std::rc::Rc,
|
||||
uapi::OwnedFd,
|
||||
};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct DmaBufPlane {
|
||||
|
|
@ -12,6 +17,10 @@ pub struct DmaBuf {
|
|||
pub width: i32,
|
||||
pub height: i32,
|
||||
pub format: &'static Format,
|
||||
pub modifier: u64,
|
||||
pub planes: Vec<DmaBufPlane>,
|
||||
pub modifier: Modifier,
|
||||
pub planes: PlaneVec<DmaBufPlane>,
|
||||
}
|
||||
|
||||
pub const MAX_PLANES: usize = 4;
|
||||
|
||||
pub type PlaneVec<T> = ArrayVec<T, MAX_PLANES>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue