Mesa (master): egl: Clean up eglconfig.h.

Chia-I Wu olv at kemper.freedesktop.org
Fri Feb 5 06:20:30 UTC 2010


Module: Mesa
Branch: master
Commit: a37dc17c122ed25365b100aefe4b941df1b526c0
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a37dc17c122ed25365b100aefe4b941df1b526c0

Author: Chia-I Wu <olvaffe at gmail.com>
Date:   Fri Feb  5 13:33:55 2010 +0800

egl: Clean up eglconfig.h.

Update the comments to macros/functions.  Remove unused
_eglSetConfigAttrib.

---

 src/egl/main/eglconfig.h |   21 +++++++--------------
 1 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/src/egl/main/eglconfig.h b/src/egl/main/eglconfig.h
index 09dc61f..56ec95f 100644
--- a/src/egl/main/eglconfig.h
+++ b/src/egl/main/eglconfig.h
@@ -21,6 +21,9 @@ struct _egl_config
 };
 
 
+/**
+ * Macros for source level compatibility.
+ */
 #define SET_CONFIG_ATTRIB(CONF, ATTR, VAL) _eglSetConfigKey(CONF, ATTR, VAL)
 #define GET_CONFIG_ATTRIB(CONF, ATTR) _eglGetConfigKey(CONF, ATTR)
 
@@ -55,6 +58,10 @@ _eglResetConfigKeys(_EGLConfig *conf, EGLint val)
 
 /**
  * Update a config for a given key.
+ *
+ * Note that a valid key is not necessarily a valid attribute.  There are gaps
+ * in the attribute enums.  The separation is to catch application errors.
+ * Drivers should never set a key that is an invalid attribute.
  */
 static INLINE void
 _eglSetConfigKey(_EGLConfig *conf, EGLint key, EGLint val)
@@ -77,20 +84,6 @@ _eglGetConfigKey(const _EGLConfig *conf, EGLint key)
 }
 
 
-/**
- * Set a given attribute.
- *
- * Because _eglGetConfigAttrib is already used as a fallback driver
- * function, this function is not considered to have a good name.
- * SET_CONFIG_ATTRIB is preferred over this function.
- */
-static INLINE void
-_eglSetConfigAttrib(_EGLConfig *conf, EGLint attr, EGLint val)
-{
-   SET_CONFIG_ATTRIB(conf, attr, val);
-}
-
-
 PUBLIC void
 _eglInitConfig(_EGLConfig *config, _EGLDisplay *dpy, EGLint id);
 




More information about the mesa-commit mailing list