From 41700e355f32ed8e68d943f867089b26c9b91aa3 Mon Sep 17 00:00:00 2001 From: "Miguel A. Vico" Date: Wed, 18 May 2016 17:47:59 +0200 Subject: [PATCH] gl-renderer: Add param to gl_renderer_display_create This change adds parameter to gl_renderer_display_create() in case we ever want to pass non-NULL. Signed-off-by: Miguel A Vico Moya Reviewed-by: Andy Ritger Reviewed-by: James Jones [Pekka: removed notes about EGLOutput] Signed-off-by: Pekka Paalanen --- libweston/compositor-drm.c | 1 + libweston/compositor-wayland.c | 1 + libweston/compositor-x11.c | 2 +- libweston/gl-renderer.c | 6 +++--- libweston/gl-renderer.h | 1 + 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c index 41ad9dea..a8992138 100644 --- a/libweston/compositor-drm.c +++ b/libweston/compositor-drm.c @@ -1572,6 +1572,7 @@ drm_backend_create_gl_renderer(struct drm_backend *b) if (gl_renderer->display_create(b->compositor, EGL_PLATFORM_GBM_KHR, (void *)b->gbm, + NULL, gl_renderer->opaque_attribs, format, n_formats) < 0) { diff --git a/libweston/compositor-wayland.c b/libweston/compositor-wayland.c index 1a46c4e7..c6ac5fe0 100644 --- a/libweston/compositor-wayland.c +++ b/libweston/compositor-wayland.c @@ -2352,6 +2352,7 @@ wayland_backend_create(struct weston_compositor *compositor, if (gl_renderer->display_create(compositor, EGL_PLATFORM_WAYLAND_KHR, b->parent.wl_display, + NULL, gl_renderer->alpha_attribs, NULL, 0) < 0) { diff --git a/libweston/compositor-x11.c b/libweston/compositor-x11.c index 0804591d..ea77f31d 100644 --- a/libweston/compositor-x11.c +++ b/libweston/compositor-x11.c @@ -1647,7 +1647,7 @@ init_gl_renderer(struct x11_backend *b) return -1; ret = gl_renderer->display_create(b->compositor, EGL_PLATFORM_X11_KHR, - (void *) b->dpy, + (void *) b->dpy, NULL, gl_renderer->opaque_attribs, NULL, 0); return ret; diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c index 1463de1f..cf8df087 100644 --- a/libweston/gl-renderer.c +++ b/libweston/gl-renderer.c @@ -2990,8 +2990,8 @@ gl_renderer_create_pbuffer_surface(struct gl_renderer *gr) { static int gl_renderer_display_create(struct weston_compositor *ec, EGLenum platform, - void *native_window, const EGLint *config_attribs, - const EGLint *visual_id, int n_ids) + void *native_window, const EGLint *platform_attribs, + const EGLint *config_attribs, const EGLint *visual_id, int n_ids) { struct gl_renderer *gr; EGLint major, minor; @@ -3033,7 +3033,7 @@ gl_renderer_display_create(struct weston_compositor *ec, EGLenum platform, if (get_platform_display && platform) { gr->egl_display = get_platform_display(platform, native_window, - NULL); + platform_attribs); } } diff --git a/libweston/gl-renderer.h b/libweston/gl-renderer.h index 1835d253..b47ea07f 100644 --- a/libweston/gl-renderer.h +++ b/libweston/gl-renderer.h @@ -63,6 +63,7 @@ struct gl_renderer_interface { int (*display_create)(struct weston_compositor *ec, EGLenum platform, void *native_window, + const EGLint *platform_attribs, const EGLint *config_attribs, const EGLint *visual_id, const int n_ids);