refactor(waylan): WIP, use a basic bevy image for shm again

Signed-off-by: Schmarni <marnistromer@gmail.com>
This commit is contained in:
Schmarni
2025-07-27 02:02:47 +02:00
parent e5cfa249df
commit cd3cf3721a
4 changed files with 36 additions and 232 deletions

View File

@@ -23,7 +23,7 @@ pub struct DmabufBacking {
format: DrmFourcc,
_flags: Flags,
tex: OnceLock<Handle<Image>>,
pending_imported_dmatex: Mutex<Option<ImportedTexture>>,
// pending_imported_dmatex: Mutex<Option<ImportedTexture>>,
}
impl std::fmt::Debug for DmabufBacking {
@@ -73,7 +73,7 @@ impl DmabufBacking {
format,
_flags: flags,
tex: OnceLock::new(),
pending_imported_dmatex: Mutex::new(Some(imported_tex)),
// pending_imported_dmatex: Mutex::new(Some(imported_tex)),
})
}
@@ -84,13 +84,14 @@ impl DmabufBacking {
images: &mut Assets<Image>,
) -> Option<Handle<Image>> {
info!("updating dmabuf tex");
self.pending_imported_dmatex
.lock()
.take()
.map(|tex| dmatexes.insert_imported_dmatex(images, tex))
.inspect(|handle| {
_ = self.tex.set(handle.clone());
})
// self.pending_imported_dmatex
// .lock()
// .take()
// .map(|tex| dmatexes.insert_imported_dmatex(images, tex))
// .inspect(|handle| {
// _ = self.tex.set(handle.clone());
// })
None
}
pub fn is_transparent(&self) -> bool {