Use gbm device from image copy protocol instead of default node
This fixes `BufferConstraints` errors for workspace capture on Nvidia outputs of a Intel+Nvidia system. (That didn't happen on Amd+Nvidia; maybe a linear stride alignment issue?)
This commit is contained in:
parent
5bb719f617
commit
15e73830fa
4 changed files with 64 additions and 38 deletions
|
|
@ -27,13 +27,15 @@ use cosmic::{
|
|||
},
|
||||
};
|
||||
use futures_channel::mpsc;
|
||||
use std::{cell::RefCell, collections::HashMap, fs, path::PathBuf, sync::Arc, thread};
|
||||
use std::{cell::RefCell, collections::HashMap, sync::Arc, thread};
|
||||
|
||||
mod buffer;
|
||||
use buffer::Buffer;
|
||||
mod capture;
|
||||
use capture::Capture;
|
||||
mod dmabuf;
|
||||
mod gbm_devices;
|
||||
use gbm_devices::GbmDevices;
|
||||
mod screencopy;
|
||||
use screencopy::{ScreencopySession, SessionData};
|
||||
mod toplevel;
|
||||
|
|
@ -59,7 +61,7 @@ pub struct AppData {
|
|||
capture_filter: CaptureFilter,
|
||||
captures: RefCell<HashMap<CaptureSource, Arc<Capture>>>,
|
||||
dmabuf_feedback: Option<DmabufFeedback>,
|
||||
gbm: Option<(PathBuf, gbm::Device<fs::File>)>,
|
||||
gbm_devices: GbmDevices,
|
||||
thread_pool: futures_executor::ThreadPool,
|
||||
}
|
||||
|
||||
|
|
@ -310,7 +312,7 @@ fn start(conn: Connection) -> mpsc::Receiver<Event> {
|
|||
capture_filter: CaptureFilter::default(),
|
||||
captures: RefCell::new(HashMap::new()),
|
||||
dmabuf_feedback: None,
|
||||
gbm: None,
|
||||
gbm_devices: GbmDevices::default(),
|
||||
thread_pool,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue