libweston: Expose weston_renderer_type as ABI

Similar to the backend type, also expose the renderer type enum as ABI.
This makes it possible to implement a more consistent config API, as
opposed to every backend hand-rolling its own use-the-other-one bool.

The enums are explicitly numbered to avoid 0, so 0 can be used as a
'not-specified' sentinel value to allow backwards compatibility with the
old config interfaces.

Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
Daniel Stone 2022-12-29 17:45:00 +00:00 committed by Marius Vlad
parent 59968f7d78
commit ca4bdae05f
2 changed files with 6 additions and 6 deletions

View file

@ -2065,6 +2065,12 @@ enum weston_compositor_backend {
WESTON_BACKEND_X11,
};
enum weston_renderer_type {
WESTON_RENDERER_NOOP = 1,
WESTON_RENDERER_PIXMAN = 2,
WESTON_RENDERER_GL = 3,
};
int
weston_compositor_load_backend(struct weston_compositor *compositor,
enum weston_compositor_backend backend,

View file

@ -46,12 +46,6 @@
/* compositor <-> renderer interface */
enum weston_renderer_type {
WESTON_RENDERER_NOOP,
WESTON_RENDERER_PIXMAN,
WESTON_RENDERER_GL,
};
struct weston_renderer {
int (*read_pixels)(struct weston_output *output,
const struct pixel_format_info *format, void *pixels,