mirror of https://github.com/wayvr-org/wayvr.git
wvr_server: dont release dma buffer
This commit is contained in:
parent
e16cc7b077
commit
8fa29c0e28
|
|
@ -153,6 +153,7 @@ impl compositor::CompositorHandler for Application {
|
|||
})
|
||||
{
|
||||
let sbwi = SurfaceBufWithImage {
|
||||
buffer: Some(buffer.clone()),
|
||||
image,
|
||||
transform: wl_transform_to_frame_transform(
|
||||
attrs.buffer_transform,
|
||||
|
|
@ -173,6 +174,7 @@ impl compositor::CompositorHandler for Application {
|
|||
})
|
||||
{
|
||||
let sbwi = SurfaceBufWithImage {
|
||||
buffer: None,
|
||||
image,
|
||||
transform: wl_transform_to_frame_transform(
|
||||
attrs.buffer_transform,
|
||||
|
|
@ -183,6 +185,7 @@ impl compositor::CompositorHandler for Application {
|
|||
sbwi.apply_to_surface(states);
|
||||
}
|
||||
});
|
||||
buffer.release();
|
||||
}
|
||||
Some(BufferType::SinglePixel) => {
|
||||
let spb = get_single_pixel_buffer(&buffer).unwrap(); // always Ok
|
||||
|
|
@ -192,6 +195,7 @@ impl compositor::CompositorHandler for Application {
|
|||
})
|
||||
{
|
||||
let sbwi = SurfaceBufWithImage {
|
||||
buffer: None,
|
||||
image,
|
||||
transform: wl_transform_to_frame_transform(
|
||||
// does this even matter
|
||||
|
|
@ -202,11 +206,11 @@ impl compositor::CompositorHandler for Application {
|
|||
};
|
||||
sbwi.apply_to_surface(states);
|
||||
}
|
||||
buffer.release();
|
||||
}
|
||||
Some(other) => log::warn!("Unsupported wl_buffer format: {other:?}"),
|
||||
None => { /* don't draw anything */ }
|
||||
}
|
||||
buffer.release();
|
||||
}
|
||||
Some(BufferAssignment::Removed) | None => {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ use smithay::{
|
|||
output::{Mode, Output},
|
||||
reexports::{
|
||||
wayland_protocols_misc::server_decoration::server::org_kde_kwin_server_decoration_manager as kde_decoration,
|
||||
wayland_server::{self, backend::ClientId},
|
||||
wayland_server::{self, backend::ClientId, protocol::wl_buffer},
|
||||
},
|
||||
utils::{Logical, Size},
|
||||
wayland::{
|
||||
|
|
@ -721,6 +721,7 @@ struct SurfaceBufWithImageContainer {
|
|||
#[derive(Clone)]
|
||||
#[allow(dead_code)]
|
||||
pub struct SurfaceBufWithImage {
|
||||
pub buffer: Option<wl_buffer::WlBuffer>,
|
||||
pub image: Arc<ImageView>,
|
||||
pub transform: Transform,
|
||||
pub scale: i32,
|
||||
|
|
|
|||
Loading…
Reference in New Issue