summaryrefslogtreecommitdiff
path: root/src/egl/main/eglapi.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-05-27 14:33:54 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-05-27 14:33:54 -0600
commit721ba15bf4596b2e9589e7656005b387724875c3 (patch)
tree34821f5061822a2eac270444fca03db583376f55 /src/egl/main/eglapi.c
parent5f8a4f3e5e8fe78f1abe9ca6dd1131ad53d3d943 (diff)
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.
Diffstat (limited to 'src/egl/main/eglapi.c')
-rw-r--r--src/egl/main/eglapi.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index 4df31cc03f..e4eec26de0 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -53,10 +53,7 @@ eglGetDisplay(NativeDisplayType displayName)
_EGLDisplay *dpy;
_eglInitGlobals();
dpy = _eglNewDisplay(displayName);
- if (dpy)
- return dpy->Handle;
- else
- return EGL_NO_DISPLAY;
+ return _eglGetDisplayHandle(dpy);
}
@@ -269,10 +266,7 @@ EGLDisplay EGLAPIENTRY
eglGetCurrentDisplay(void)
{
_EGLDisplay *dpy = _eglGetCurrentDisplay();
- if (dpy)
- return dpy->Handle;
- else
- return EGL_NO_DISPLAY;
+ return _eglGetDisplayHandle(dpy);
}
@@ -288,10 +282,7 @@ EGLSurface EGLAPIENTRY
eglGetCurrentSurface(EGLint readdraw)
{
_EGLSurface *s = _eglGetCurrentSurface(readdraw);
- if (s)
- return s->Handle;
- else
- return EGL_NO_SURFACE;
+ return _eglGetSurfaceHandle(s);
}