gl-renderer: Take a list of acceptable formats in create functions
Currently we pass either a single format or no formats to the gl renderer
create and output_create functions. We extend this to any number of
formats so we can allow fallback formats if we don't get our first pick.
Reviewed-By: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-By: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
diff --git a/src/compositor-wayland.c b/src/compositor-wayland.c
index 303151c..c9983e0 100644
--- a/src/compositor-wayland.c
+++ b/src/compositor-wayland.c
@@ -648,7 +648,8 @@
output->gl.egl_window,
output->gl.egl_window,
gl_renderer->alpha_attribs,
- NULL) < 0)
+ NULL,
+ 0) < 0)
goto cleanup_window;
return 0;
@@ -1970,10 +1971,11 @@
if (!c->use_pixman) {
if (gl_renderer->create(&c->base,
- EGL_PLATFORM_WAYLAND_KHR,
- c->parent.wl_display,
- gl_renderer->alpha_attribs,
- NULL) < 0) {
+ EGL_PLATFORM_WAYLAND_KHR,
+ c->parent.wl_display,
+ gl_renderer->alpha_attribs,
+ NULL,
+ 0) < 0) {
weston_log("Failed to initialize the GL renderer; "
"falling back to pixman.\n");
c->use_pixman = 1;