[PATCH] egl: no need to lookup EGL functions manually

marcandre.lureau@redhat.com posted 1 patch 11 months, 2 weeks ago
Failed in applying to current master (apply log)
ui/egl-helpers.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
[PATCH] egl: no need to lookup EGL functions manually
Posted by marcandre.lureau@redhat.com 11 months, 2 weeks ago
From: Marc-André Lureau <marcandre.lureau@redhat.com>

libepoxy handles loading the function pointer and dispatching the call,
so you don't have to worry about it.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 ui/egl-helpers.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/ui/egl-helpers.c b/ui/egl-helpers.c
index 4203163ace..60385c1f48 100644
--- a/ui/egl-helpers.c
+++ b/ui/egl-helpers.c
@@ -439,10 +439,8 @@ static EGLDisplay qemu_egl_get_display(EGLNativeDisplayType native,
 
     /* In practise any EGL 1.5 implementation would support the EXT extension */
     if (epoxy_has_egl_extension(NULL, "EGL_EXT_platform_base")) {
-        PFNEGLGETPLATFORMDISPLAYEXTPROC getPlatformDisplayEXT =
-            (void *) eglGetProcAddress("eglGetPlatformDisplayEXT");
-        if (getPlatformDisplayEXT && platform != 0) {
-            dpy = getPlatformDisplayEXT(platform, native, NULL);
+        if (platform != 0) {
+            dpy = eglGetPlatformDisplayEXT(platform, native, NULL);
         }
     }
 
-- 
2.40.1