aboutsummaryrefslogtreecommitdiff
path: root/src/backend/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/mod.rs')
-rw-r--r--src/backend/mod.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/backend/mod.rs b/src/backend/mod.rs
index 18c7ea10..05b898dc 100644
--- a/src/backend/mod.rs
+++ b/src/backend/mod.rs
@@ -2,6 +2,7 @@ use std::collections::HashMap;
use std::sync::{Arc, Mutex};
use std::time::Duration;
+use smithay::backend::allocator::dmabuf::Dmabuf;
use smithay::backend::renderer::gles::GlesRenderer;
use smithay::output::Output;
@@ -93,6 +94,13 @@ impl Backend {
}
}
+ pub fn import_dmabuf(&mut self, dmabuf: &Dmabuf) -> Result<(), ()> {
+ match self {
+ Backend::Tty(tty) => tty.import_dmabuf(dmabuf),
+ Backend::Winit(winit) => winit.import_dmabuf(dmabuf),
+ }
+ }
+
#[cfg_attr(not(feature = "dbus"), allow(unused))]
pub fn connectors(&self) -> Arc<Mutex<HashMap<String, Output>>> {
match self {