diff options
author | sfan5 <sfan5@live.de> | 2021-11-15 22:55:59 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2021-11-17 22:38:34 +0100 |
commit | da3b85b613421fadeb92936a623412629661b4e1 (patch) | |
tree | 2be96e02c94eea17dc51323818609cfb483aa221 | |
parent | b69af0abefd7fa78fbc5c233e264c9155b091ad9 (diff) | |
download | mpv-da3b85b613421fadeb92936a623412629661b4e1.tar.bz2 mpv-da3b85b613421fadeb92936a623412629661b4e1.tar.xz |
context_drm_egl: make use of mpegl_create_window_surface()
This does what 3a10210c568f9c7d969ca6c4da2377c55fbf30f3 was supposed to, but better.
-rw-r--r-- | video/out/opengl/context_drm_egl.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/video/out/opengl/context_drm_egl.c b/video/out/opengl/context_drm_egl.c index 4487751266..a7f99cfd0d 100644 --- a/video/out/opengl/context_drm_egl.c +++ b/video/out/opengl/context_drm_egl.c @@ -45,11 +45,6 @@ #define EGL_PLATFORM_GBM_KHR 0x31D7 #endif -#ifndef EGL_EXT_platform_base -typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC) - (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLint *attrib_list); -#endif - struct framebuffer { int fd; @@ -235,12 +230,9 @@ static bool init_egl(struct ra_ctx *ctx) return false; MP_VERBOSE(ctx, "Initializing EGL surface\n"); - PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC create_window_surface = NULL; - create_window_surface = (void *) eglGetProcAddress("eglCreatePlatformWindowSurfaceEXT"); - if (create_window_surface) { - p->egl.surface = create_window_surface( - p->egl.display, config, p->gbm.surface, NULL); - } else { + p->egl.surface = mpegl_create_window_surface( + p->egl.display, config, p->gbm.surface); + if (p->egl.surface == EGL_NO_SURFACE) { p->egl.surface = eglCreateWindowSurface( p->egl.display, config, p->gbm.surface, NULL); } |