Remove currently unused node field of Buffer
This commit is contained in:
parent
15e73830fa
commit
509e572e8e
1 changed files with 2 additions and 17 deletions
|
|
@ -11,11 +11,7 @@ use cosmic::{
|
||||||
BufferSource, Dmabuf, Plane, Shmbuf,
|
BufferSource, Dmabuf, Plane, Shmbuf,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
use std::{
|
use std::{os::fd::AsFd, sync::Arc};
|
||||||
os::fd::AsFd,
|
|
||||||
path::{Path, PathBuf},
|
|
||||||
sync::Arc,
|
|
||||||
};
|
|
||||||
use wayland_protocols::wp::linux_dmabuf::zv1::client::zwp_linux_buffer_params_v1;
|
use wayland_protocols::wp::linux_dmabuf::zv1::client::zwp_linux_buffer_params_v1;
|
||||||
|
|
||||||
use super::AppData;
|
use super::AppData;
|
||||||
|
|
@ -24,7 +20,6 @@ use crate::utils;
|
||||||
pub struct Buffer {
|
pub struct Buffer {
|
||||||
pub backing: Arc<BufferSource>,
|
pub backing: Arc<BufferSource>,
|
||||||
pub buffer: wl_buffer::WlBuffer,
|
pub buffer: wl_buffer::WlBuffer,
|
||||||
node: Option<PathBuf>,
|
|
||||||
pub size: (u32, u32),
|
pub size: (u32, u32),
|
||||||
#[cfg(feature = "no-subsurfaces")]
|
#[cfg(feature = "no-subsurfaces")]
|
||||||
pub mmap: memmap2::Mmap,
|
pub mmap: memmap2::Mmap,
|
||||||
|
|
@ -72,7 +67,6 @@ impl AppData {
|
||||||
buffer,
|
buffer,
|
||||||
#[cfg(feature = "no-subsurfaces")]
|
#[cfg(feature = "no-subsurfaces")]
|
||||||
mmap,
|
mmap,
|
||||||
node: None,
|
|
||||||
size: (width, height),
|
size: (width, height),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -90,7 +84,7 @@ impl AppData {
|
||||||
return Ok(None);
|
return Ok(None);
|
||||||
};
|
};
|
||||||
let drm_dev = drm_dev.unwrap_or(feedback.main_device() as u64);
|
let drm_dev = drm_dev.unwrap_or(feedback.main_device() as u64);
|
||||||
let Some((node, gbm)) = self.gbm_devices.gbm_device(drm_dev)? else {
|
let Some((_, gbm)) = self.gbm_devices.gbm_device(drm_dev)? else {
|
||||||
return Ok(None);
|
return Ok(None);
|
||||||
};
|
};
|
||||||
let formats = feedback.format_table();
|
let formats = feedback.format_table();
|
||||||
|
|
@ -174,7 +168,6 @@ impl AppData {
|
||||||
.into(),
|
.into(),
|
||||||
),
|
),
|
||||||
buffer,
|
buffer,
|
||||||
node: Some(node.to_owned()),
|
|
||||||
size: (width, height),
|
size: (width, height),
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
@ -211,14 +204,6 @@ impl AppData {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Buffer {
|
|
||||||
// Use this when dmabuf/screencopy has a way to specify node
|
|
||||||
#[allow(dead_code)]
|
|
||||||
pub fn node(&self) -> Option<&Path> {
|
|
||||||
self.node.as_deref()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Drop for Buffer {
|
impl Drop for Buffer {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
self.buffer.destroy();
|
self.buffer.destroy();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue