backend-vnc: Add renderer parameter to backend config
Add an explicit request to the backend config to choose the renderer. Currently, only Pixman remains supported, with auto defaulting to that. Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
6a45ae871c
commit
54356be853
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user