diff options
author | Emil Velikov <emil.velikov@collabora.com> | 2016-11-14 17:08:12 +0000 |
---|---|---|
committer | Daniel Stone <daniels@collabora.com> | 2016-11-21 16:07:05 +0000 |
commit | 3612be2302fd1244630f65220f5de2db1abc92bf (patch) | |
tree | f0f51aead6ffc1b59441ef9b9c66e9b719839bf8 /shared | |
parent | 43cea54c905cc5b46541f28e828497c47bb027d5 (diff) | |
download | weston-3612be2302fd1244630f65220f5de2db1abc92bf.tar.gz |
shared/platform.h: introduce weston_platform_destroy_egl_surface()
Introduce the weston_platform_destroy_egl_surface() wrapper to
complement the weston_platform_create_egl_surface() one.
We'll use the former with the next patches trhoughout weston to
consistently destroy the surface as needed.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Diffstat (limited to 'shared')
-rw-r--r-- | shared/platform.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/shared/platform.h b/shared/platform.h index 30db1a6d..40d9bf2a 100644 --- a/shared/platform.h +++ b/shared/platform.h @@ -128,6 +128,13 @@ weston_platform_create_egl_surface(EGLDisplay dpy, EGLConfig config, attrib_list); } +static inline EGLBoolean +weston_platform_destroy_egl_surface(EGLDisplay display, + EGLSurface surface) +{ + return eglDestroySurface(display, surface); +} + #else /* ENABLE_EGL */ static inline void * @@ -144,6 +151,13 @@ weston_platform_create_egl_surface(void *dpy, void *config, { return NULL; } + +static inline unsigned int +weston_platform_destroy_egl_surface(void *display, + void *surface) +{ + return 1; +} #endif /* ENABLE_EGL */ #ifdef __cplusplus |