aboutsummaryrefslogtreecommitdiffstats
path: root/src/egl/main/eglconfig.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-05-27 14:33:54 -0600
committerBrian Paul <[email protected]>2008-05-27 14:33:54 -0600
commit721ba15bf4596b2e9589e7656005b387724875c3 (patch)
tree34821f5061822a2eac270444fca03db583376f55 /src/egl/main/eglconfig.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/eglconfig.c')
-rw-r--r--src/egl/main/eglconfig.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/egl/main/eglconfig.c b/src/egl/main/eglconfig.c
index a74cd23113d..1b49f7afd92 100644
--- a/src/egl/main/eglconfig.c
+++ b/src/egl/main/eglconfig.c
@@ -102,7 +102,19 @@ _eglInitConfig(_EGLConfig *config, EGLint id)
/**
+ * Return the public handle for an internal _EGLConfig.
+ * This is the inverse of _eglLookupConfig().
+ */
+EGLConfig
+_eglGetConfigHandle(_EGLConfig *config)
+{
+ return config ? config->Handle : 0;
+}
+
+
+/**
* Given an EGLConfig handle, return the corresponding _EGLConfig object.
+ * This is the inverse of _eglGetConfigHandle().
*/
_EGLConfig *
_eglLookupConfig(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config)