egl: drop left-over function prototype
[mesa.git] / src / egl / main / egldisplay.c
index f6e85c79aa903513d39bd6f7e1d970c5d11383f6..3321d9e412e2e57e6ed848d65aa78fca32c85c6a 100644 (file)
@@ -39,6 +39,7 @@
 #include <fcntl.h>
 #include "c11/threads.h"
 #include "util/macros.h"
+#include "util/os_file.h"
 #include "util/u_atomic.h"
 
 #include "eglcontext.h"
@@ -302,7 +303,7 @@ _eglReleaseDisplayResources(_EGLDriver *drv, _EGLDisplay *display)
       list = list->Next;
 
       _eglUnlinkContext(ctx);
-      drv->API.DestroyContext(drv, display, ctx);
+      drv->DestroyContext(drv, display, ctx);
    }
    assert(!display->ResourceLists[_EGL_RESOURCE_CONTEXT]);
 
@@ -312,7 +313,7 @@ _eglReleaseDisplayResources(_EGLDriver *drv, _EGLDisplay *display)
       list = list->Next;
 
       _eglUnlinkSurface(surf);
-      drv->API.DestroySurface(drv, display, surf);
+      drv->DestroySurface(drv, display, surf);
    }
    assert(!display->ResourceLists[_EGL_RESOURCE_SURFACE]);
 
@@ -322,7 +323,7 @@ _eglReleaseDisplayResources(_EGLDriver *drv, _EGLDisplay *display)
       list = list->Next;
 
       _eglUnlinkImage(image);
-      drv->API.DestroyImageKHR(drv, display, image);
+      drv->DestroyImageKHR(drv, display, image);
    }
    assert(!display->ResourceLists[_EGL_RESOURCE_IMAGE]);
 
@@ -332,7 +333,7 @@ _eglReleaseDisplayResources(_EGLDriver *drv, _EGLDisplay *display)
       list = list->Next;
 
       _eglUnlinkSync(sync);
-      drv->API.DestroySyncKHR(drv, display, sync);
+      drv->DestroySyncKHR(drv, display, sync);
    }
    assert(!display->ResourceLists[_EGL_RESOURCE_SYNC]);
 }
@@ -533,7 +534,6 @@ _eglGetWaylandDisplay(struct wl_display *native_display,
 }
 #endif /* HAVE_WAYLAND_PLATFORM */
 
-#ifdef HAVE_SURFACELESS_PLATFORM
 _EGLDisplay*
 _eglGetSurfacelessDisplay(void *native_display,
                           const EGLAttrib *attrib_list)
@@ -553,7 +553,6 @@ _eglGetSurfacelessDisplay(void *native_display,
    return _eglFindDisplay(_EGL_PLATFORM_SURFACELESS, native_display,
                           attrib_list);
 }
-#endif /* HAVE_SURFACELESS_PLATFORM */
 
 #ifdef HAVE_ANDROID_PLATFORM
 _EGLDisplay*
@@ -618,7 +617,7 @@ _eglGetDeviceDisplay(void *native_display,
     * The new fd is guaranteed to be 3 or greater.
     */
    if (fd != -1 && display->Options.fd == 0) {
-      display->Options.fd = fcntl(fd, F_DUPFD_CLOEXEC, 3);
+      display->Options.fd = os_dupfd_cloexec(fd);
       if (display->Options.fd == -1) {
          /* Do not (really) need to teardown the display */
          _eglError(EGL_BAD_ALLOC, "eglGetPlatformDisplay");