1
0
Fork 0
forked from wry/wry

clientmem: store more information about mappings

This commit is contained in:
Julian Orth 2024-09-07 17:00:08 +02:00
parent 92f7cb56fd
commit 604974c927
6 changed files with 67 additions and 18 deletions

View file

@ -34,7 +34,7 @@ impl WlShmPool {
Ok(Self {
id,
client: client.clone(),
mem: CloneCell::new(Rc::new(ClientMem::new(fd.raw(), len, false)?)),
mem: CloneCell::new(Rc::new(ClientMem::new(&fd, len, false, Some(client))?)),
fd,
tracker: Default::default(),
version,
@ -82,9 +82,10 @@ impl WlShmPoolRequestHandler for WlShmPool {
return Err(WlShmPoolError::CannotShrink);
}
self.mem.set(Rc::new(ClientMem::new(
self.fd.raw(),
&self.fd,
req.size as usize,
false,
Some(&self.client),
)?));
Ok(())
}