From 721ba15bf4596b2e9589e7656005b387724875c3 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 27 May 2008 14:33:54 -0600 Subject: added _eglGet*Handle() functions These are the inverse of the _eglLookup*() functions. Returns the public handle for a private surface/config/display/etc. Removes glapi.c's direct access of private fields. --- src/egl/main/egldisplay.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/egl/main/egldisplay.c') diff --git a/src/egl/main/egldisplay.c b/src/egl/main/egldisplay.c index 59d0bd3dc3..fd24f22273 100644 --- a/src/egl/main/egldisplay.c +++ b/src/egl/main/egldisplay.c @@ -39,9 +39,24 @@ _eglNewDisplay(NativeDisplayType displayName) } +/** + * Return the public handle for an internal _EGLDisplay. + * This is the inverse of _eglLookupDisplay(). + */ +EGLDisplay +_eglGetDisplayHandle(_EGLDisplay *display) +{ + if (display) + return display->Handle; + else + return EGL_NO_DISPLAY; +} + + /** * Return the _EGLDisplay object that corresponds to the given public/ * opaque display handle. + * This is the inverse of _eglGetDisplayHandle(). */ _EGLDisplay * _eglLookupDisplay(EGLDisplay dpy) -- cgit v1.2.3