egui: add integration
This commit is contained in:
parent
85b9b7222d
commit
008e8a671a
49 changed files with 4110 additions and 149 deletions
|
|
@ -1,8 +1,12 @@
|
|||
use {
|
||||
crate::{
|
||||
format::Format,
|
||||
gfx_api::SyncFile,
|
||||
utils::{compat::IoctlNumber, oserror::OsError},
|
||||
video::{LINEAR_MODIFIER, Modifier},
|
||||
video::{
|
||||
LINEAR_MODIFIER, Modifier,
|
||||
drm::{DrmError, syncobj::merge_sync_files},
|
||||
},
|
||||
},
|
||||
arrayvec::ArrayVec,
|
||||
std::{cell::OnceCell, rc::Rc, sync::OnceLock},
|
||||
|
|
@ -113,6 +117,22 @@ impl DmaBuf {
|
|||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn export_sync_file(&self, flags: u32) -> Result<Option<SyncFile>, DrmError> {
|
||||
let mut sf = PlaneVec::new();
|
||||
for plane in &self.planes {
|
||||
sf.push(
|
||||
dma_buf_export_sync_file(&plane.fd, flags)
|
||||
.map(Rc::new)
|
||||
.map(SyncFile)
|
||||
.map_err(DrmError::ExportSyncFile)?,
|
||||
);
|
||||
if self.is_one_file() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
merge_sync_files(sf.iter())
|
||||
}
|
||||
}
|
||||
|
||||
const DMA_BUF_BASE: u64 = b'b' as _;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue