screencopy: map dmabuf after it's ready

pull/55/head
Andri Yngvason 2020-06-24 18:31:29 +00:00
parent 19eb9af7e5
commit 0178dd8a39
1 changed files with 2 additions and 9 deletions

View File

@ -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);
}