Don't render when a client is still encoding

pull/30/head
Andri Yngvason 2020-04-10 12:07:35 +00:00
parent 1c2a2231d6
commit 297e22b588
1 changed files with 8 additions and 1 deletions

View File

@ -806,14 +806,21 @@ bool nvnc__is_damaged(struct nvnc* self)
void on_main_dispatch(void* aml_obj) void on_main_dispatch(void* aml_obj)
{ {
struct nvnc* self = aml_get_userdata(aml_obj); struct nvnc* self = aml_get_userdata(aml_obj);
struct nvnc_client* client;
if (!nvnc__is_damaged(self)) if (!nvnc__is_damaged(self))
return; return;
LIST_FOREACH(client, &self->clients, link)
if (client->is_updating) {
log_debug("Can't render yet: still encoding for client %p\n",
client);
return;
}
if (self->render_fn) if (self->render_fn)
self->render_fn(self, self->buffer); self->render_fn(self, self->buffer);
struct nvnc_client* client;
LIST_FOREACH(client, &self->clients, link) LIST_FOREACH(client, &self->clients, link)
process_fb_update_requests(client); process_fb_update_requests(client);
} }