diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2008-05-27 14:33:54 -0600 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2008-05-27 14:33:54 -0600 |
commit | 721ba15bf4596b2e9589e7656005b387724875c3 (patch) | |
tree | 34821f5061822a2eac270444fca03db583376f55 /src/egl/main/eglsurface.c | |
parent | 5f8a4f3e5e8fe78f1abe9ca6dd1131ad53d3d943 (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/eglsurface.c')
-rw-r--r-- | src/egl/main/eglsurface.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/egl/main/eglsurface.c b/src/egl/main/eglsurface.c index 134afa7cbd8..1dbb12ecfe0 100644 --- a/src/egl/main/eglsurface.c +++ b/src/egl/main/eglsurface.c @@ -223,6 +223,26 @@ _eglRemoveSurface(_EGLSurface *surf) } + +/** + * Return the public handle for an internal _EGLSurface. + * This is the inverse of _eglLookupSurface(). + */ +EGLSurface +_eglGetSurfaceHandle(_EGLSurface *surface) +{ + if (surface) + return surface->Handle; + else + return EGL_NO_SURFACE; +} + + +/** + * Return the private _EGLSurface which corresponds to a public EGLSurface + * handle. + * This is the inverse of _eglGetSurfaceHandle(). + */ _EGLSurface * _eglLookupSurface(EGLSurface surf) { |