backend-vnc: fix vnc_switch_mode

Fix the incorrect fb_pool stride set in vnc_switch_mode.
Also replace nvnc_fb_pool_unref/new with nvnc_fb_pool_resize.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
This commit is contained in:
Philipp Zabel 2022-11-06 16:31:56 +01:00 committed by Philipp Zabel
parent 0f5f794ddb
commit 102acac6a9

View file

@ -875,12 +875,9 @@ vnc_switch_mode(struct weston_output *base, struct weston_mode *target_mode)
weston_renderer_resize_output(base, &fb_size, NULL);
nvnc_fb_pool_unref(output->fb_pool);
output->fb_pool = nvnc_fb_pool_new(target_mode->width,
target_mode->height,
DRM_FORMAT_XRGB8888,
target_mode->width * 4);
nvnc_fb_pool_resize(output->fb_pool, target_mode->width,
target_mode->height, DRM_FORMAT_XRGB8888,
target_mode->width);
return 0;
}