screencopy: map dmabuf after it's ready

pixman-rendering
Andri Yngvason 2020-06-24 18:31:29 +00:00
parent c4ca264772
commit 8c9211eed6
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);
}