gl-renderer: Add <platform_attribs> param to gl_renderer_display_create

This change adds <platform_attribs> parameter to
gl_renderer_display_create() in case we ever want to pass non-NULL.

Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
Reviewed-by: Andy Ritger <aritger@nvidia.com>
Reviewed-by: James Jones <jajones@nvidia.com>
[Pekka: removed notes about EGLOutput]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This commit is contained in:
Miguel A. Vico 2016-05-18 17:47:59 +02:00 committed by Pekka Paalanen
parent 684c9f49e5
commit 41700e355f
5 changed files with 7 additions and 4 deletions

View File

@ -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) {

View File

@ -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) {

View File

@ -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;

View File

@ -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);
}
}

View File

@ -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);