From da3b85b613421fadeb92936a623412629661b4e1 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Mon, 15 Nov 2021 22:55:59 +0100 Subject: context_drm_egl: make use of mpegl_create_window_surface() This does what 3a10210c568f9c7d969ca6c4da2377c55fbf30f3 was supposed to, but better. --- video/out/opengl/context_drm_egl.c | 14 +++----------- 1 file 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); } -- cgit v1.2.3