diff options
author | Chad Versace <[email protected]> | 2016-10-12 15:48:15 -0700 |
---|---|---|
committer | Chad Versace <[email protected]> | 2016-10-14 11:19:40 -0700 |
commit | a597c8ad5b75f37336257e3f4462caebacb621ef (patch) | |
tree | a511f5cdc001958448b535f7f201a681a7bb15d7 /src/egl/main/egldisplay.c | |
parent | c177ef9d47943f648a13beed14269f468583c16e (diff) |
egl: Implement EGL_MESA_platform_surfaceless
Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/egl/main/egldisplay.c')
-rw-r--r-- | src/egl/main/egldisplay.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/egl/main/egldisplay.c b/src/egl/main/egldisplay.c index 3d4eb8126fc..37711bd8695 100644 --- a/src/egl/main/egldisplay.c +++ b/src/egl/main/egldisplay.c @@ -540,3 +540,24 @@ _eglGetWaylandDisplay(struct wl_display *native_display, return _eglFindDisplay(_EGL_PLATFORM_WAYLAND, native_display); } #endif /* HAVE_WAYLAND_PLATFORM */ + +#ifdef HAVE_SURFACELESS_PLATFORM +_EGLDisplay* +_eglGetSurfacelessDisplay(void *native_display, + const EGLint *attrib_list) +{ + /* This platform has no native display. */ + if (native_display != NULL) { + _eglError(EGL_BAD_PARAMETER, "eglGetPlatformDisplay"); + return NULL; + } + + /* This platform recognizes no display attributes. */ + if (attrib_list != NULL && attrib_list[0] != EGL_NONE) { + _eglError(EGL_BAD_ATTRIBUTE, "eglGetPlatformDisplay"); + return NULL; + } + + return _eglFindDisplay(_EGL_PLATFORM_SURFACELESS, native_display); +} +#endif /* HAVE_SURFACELESS_PLATFORM */ |