diff --git a/compositor/main.c b/compositor/main.c index 111ddebcb..8e5c904ce 100644 --- a/compositor/main.c +++ b/compositor/main.c @@ -3208,6 +3208,7 @@ weston_vnc_backend_config_init(struct weston_vnc_backend_config *config) config->base.struct_version = WESTON_VNC_BACKEND_CONFIG_VERSION; config->base.struct_size = sizeof(struct weston_vnc_backend_config); + config->renderer = WESTON_RENDERER_AUTO; config->bind_address = NULL; config->port = 5900; config->refresh_rate = VNC_DEFAULT_FREQ; diff --git a/include/libweston/backend-vnc.h b/include/libweston/backend-vnc.h index 3495c0e4f..c8c299846 100644 --- a/include/libweston/backend-vnc.h +++ b/include/libweston/backend-vnc.h @@ -55,10 +55,11 @@ weston_vnc_output_get_api(struct weston_compositor *compositor) return (const struct weston_vnc_output_api *)api; } -#define WESTON_VNC_BACKEND_CONFIG_VERSION 1 +#define WESTON_VNC_BACKEND_CONFIG_VERSION 2 struct weston_vnc_backend_config { struct weston_backend_config base; + enum weston_renderer_type renderer; char *bind_address; int port; int refresh_rate; diff --git a/libweston/backend-vnc/vnc.c b/libweston/backend-vnc/vnc.c index d39ed97a4..92f827065 100644 --- a/libweston/backend-vnc/vnc.c +++ b/libweston/backend-vnc/vnc.c @@ -972,6 +972,16 @@ vnc_backend_create(struct weston_compositor *compositor, if (weston_compositor_set_presentation_clock_software(compositor) < 0) goto err_compositor; + switch (config->renderer) { + case WESTON_RENDERER_AUTO: + case WESTON_RENDERER_PIXMAN: + weston_log("Using Pixman renderer\n"); + break; + default: + weston_log("Unsupported renderer requested\n"); + goto err_compositor; + } + if (pixman_renderer_init(compositor) < 0) goto err_compositor;