From 8c9211eed6526f3c2ff8afcfd0db582b7dfcf01d Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Wed, 24 Jun 2020 18:31:29 +0000 Subject: [PATCH] screencopy: map dmabuf after it's ready --- src/screencopy.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/screencopy.c b/src/screencopy.c index c8c0680..cd59c0f 100644 --- a/src/screencopy.c +++ b/src/screencopy.c @@ -37,15 +37,6 @@ #define RATE_LIMIT 20.0 // Hz #define DELAY_SMOOTHER_TIME_CONSTANT 0.5 // s -static uint32_t fourcc_from_wl_shm(enum wl_shm_format in) -{ - switch (in) { - case WL_SHM_FORMAT_ARGB8888: return DRM_FORMAT_ARGB8888; - case WL_SHM_FORMAT_XRGB8888: return DRM_FORMAT_XRGB8888; - default: return in; - } -} - static void screencopy_stop(struct frame_capture* fc) { struct screencopy* self = (void*)fc; @@ -181,6 +172,8 @@ static void screencopy_ready(void* data, self->back = self->front; self->front = NULL; + wv_buffer_map(self->back); + self->frame_capture.status = CAPTURE_DONE; self->frame_capture.on_done(&self->frame_capture); }