drm: add unique identifiers to dmabufs
This commit is contained in:
parent
3635ae0104
commit
fed2ceb8b5
17 changed files with 72 additions and 25 deletions
|
|
@ -236,9 +236,14 @@ impl JayScreencast {
|
|||
}
|
||||
false => &format.write_modifiers,
|
||||
};
|
||||
let buffer =
|
||||
ctx.gbm()
|
||||
.create_bo(mode.width, mode.height, XRGB8888, modifiers, usage)?;
|
||||
let buffer = ctx.gbm().create_bo(
|
||||
&self.client.state.dma_buf_ids,
|
||||
mode.width,
|
||||
mode.height,
|
||||
XRGB8888,
|
||||
modifiers,
|
||||
usage,
|
||||
)?;
|
||||
let fb = ctx.clone().dmabuf_img(buffer.dmabuf())?.to_framebuffer()?;
|
||||
buffers.push(ScreencastBuffer {
|
||||
dmabuf: buffer.dmabuf().clone(),
|
||||
|
|
|
|||
|
|
@ -119,6 +119,7 @@ impl WlDrm {
|
|||
None => return Err(WlDrmError::InvalidFormat(req.format)),
|
||||
};
|
||||
let mut dmabuf = DmaBuf {
|
||||
id: self.client.state.dma_buf_ids.next(),
|
||||
width: req.width,
|
||||
height: req.height,
|
||||
format,
|
||||
|
|
|
|||
|
|
@ -114,6 +114,7 @@ impl ZwpLinuxBufferParamsV1 {
|
|||
return Err(ZwpLinuxBufferParamsV1Error::InvalidModifier(modifier));
|
||||
}
|
||||
let mut dmabuf = DmaBuf {
|
||||
id: self.parent.client.state.dma_buf_ids.next(),
|
||||
width,
|
||||
height,
|
||||
format: format.format,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue