Add force-shm-screencopy feature for debugging

This commit is contained in:
Ian Douglas Scott 2024-04-01 14:34:22 -07:00
parent a2493fc90e
commit 1fc416bb2e
2 changed files with 4 additions and 1 deletions

View file

@ -114,7 +114,7 @@ impl AppData {
}
}
#[allow(dead_code)]
#[cfg(not(feature = "force-shm-screencopy"))]
fn create_gbm_buffer(
&self,
format: u32,
@ -215,6 +215,7 @@ impl AppData {
// XXX Handle other formats?
let format = u32::from(wl_shm::Format::Abgr8888);
#[cfg(not(feature = "force-shm-screencopy"))]
if let Some((_, modifiers)) = formats.dmabuf_formats.iter().find(|(f, _)| *f == format) {
match self.create_gbm_buffer(format, formats.buffer_size, false) {
Ok(Some(buffer)) => {