Allocate framebuffer per client

tight-png
Andri Yngvason 2019-09-06 20:33:55 +00:00 committed by Andri Yngvason
parent 18062f08d2
commit b6f29b036c
1 changed files with 5 additions and 5 deletions

View File

@ -775,11 +775,6 @@ int nvnc_update_fb(struct nvnc *self, const struct nvnc_fb *fb,
(struct pixman_region16*)input_region,
0, 0, fb->width, fb->height);
struct vec frame;
rc = vec_init(&frame, fb->width * fb->height * 3 / 2);
if (rc < 0)
goto failure;
struct nvnc_client *client;
LIST_FOREACH(client, &self->clients, link) {
@ -793,6 +788,11 @@ int nvnc_update_fb(struct nvnc *self, const struct nvnc_fb *fb,
if (!pixman_region_not_empty(cregion))
continue;
struct vec frame;
rc = vec_init(&frame, fb->width * fb->height * 3 / 2);
if (rc < 0)
goto failure;
zrle_encode_frame(&client->z_stream, &frame, &client->pixfmt,
fb->addr, &server_fmt, fb->width, fb->height,
&region);