libweston: Add WESTON_RENDERER_AUTO type

Add an 'auto' or unspecified renderer type, so we can use enum
weston_renderer_type during the configuration stage, where the target
renderer may be unspecified or unknown.

Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
Daniel Stone 2022-12-29 20:08:27 +00:00 committed by Marius Vlad
parent ca4bdae05f
commit e1da6c6615
2 changed files with 5 additions and 0 deletions

View file

@ -2066,6 +2066,7 @@ enum weston_compositor_backend {
};
enum weston_renderer_type {
WESTON_RENDERER_AUTO = 0,
WESTON_RENDERER_NOOP = 1,
WESTON_RENDERER_PIXMAN = 2,
WESTON_RENDERER_GL = 3,

View file

@ -218,6 +218,8 @@ headless_output_disable(struct weston_output *base)
break;
case WESTON_RENDERER_NOOP:
break;
case WESTON_RENDERER_AUTO:
unreachable("cannot have auto renderer at runtime");
}
return 0;
@ -351,6 +353,8 @@ headless_output_enable(struct weston_output *base)
break;
case WESTON_RENDERER_NOOP:
break;
case WESTON_RENDERER_AUTO:
unreachable("cannot have auto renderer at runtime");
}
if (ret < 0) {