Skip to content

Commit

Permalink
#60: allocate dmabuf surfaces in the size that the compositor asks us…
Browse files Browse the repository at this point in the history
… to allocate them in
  • Loading branch information
russelltg committed Feb 16, 2024
2 parents 2158d9e + 3c31b53 commit 03100b0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,8 @@ impl Dispatch<ZwlrScreencopyFrameV1, ()> for State {
zwlr_screencopy_frame_v1::Event::BufferDone => {}
zwlr_screencopy_frame_v1::Event::LinuxDmabuf {
format,
width,
height,
width: dmabuf_width,
height: dmabuf_height,
} => {
match &state.enc {
EncConstructionStage::None => unreachable!(
Expand All @@ -529,7 +529,7 @@ impl Dispatch<ZwlrScreencopyFrameV1, ()> for State {
.expect("Unknown fourcc"),
),
output.refresh,
output.size_pixels,
(dmabuf_width as i32, dmabuf_height as i32),
(*x, *y),
(*w, *h),
Arc::clone(&state.sigusr1_flag),
Expand Down Expand Up @@ -571,8 +571,8 @@ impl Dispatch<ZwlrScreencopyFrameV1, ()> for State {
);

let buf = dma_params.create_immed(
width as i32,
height as i32,
dmabuf_width as i32,
dmabuf_height as i32,
format,
zwp_linux_buffer_params_v1::Flags::empty(),
qhandle,
Expand Down

0 comments on commit 03100b0

Please sign in to comment.