egl: Add _eglSearchPathForEach.
authorChia-I Wu <olv@lunarg.com>
Wed, 5 May 2010 09:37:19 +0000 (17:37 +0800)
committerChia-I Wu <olv@lunarg.com>
Sat, 8 May 2010 06:54:13 +0000 (14:54 +0800)
The function can be used by a driver to check each search path of EGL.

src/egl/main/egldriver.c
src/egl/main/egldriver.h

index 6384242..052e611 100644 (file)
@@ -653,6 +653,21 @@ _eglInitDriverFallbacks(_EGLDriver *drv)
 
 
 /**
+ * Invoke a callback function on each EGL search path.
+ *
+ * The first argument of the callback function is the name of the search path.
+ * The second argument is the length of the name.
+ */
+void
+_eglSearchPathForEach(EGLBoolean (*callback)(const char *, size_t, void *),
+                      void *callback_data)
+{
+   const char *search_path = _eglGetSearchPath();
+   _eglPreloadForEach(search_path, callback, callback_data);
+}
+
+
+/**
  * Set the probe cache at the given key.
  *
  * A key, instead of a _EGLDriver, is used to allow the probe cache to be share
index 5568668..28b7956 100644 (file)
@@ -89,6 +89,11 @@ _eglInitDriverFallbacks(_EGLDriver *drv);
 
 
 PUBLIC void
+_eglSearchPathForEach(EGLBoolean (*callback)(const char *, size_t, void *),
+                      void *callback_data);
+
+
+PUBLIC void
 _eglSetProbeCache(EGLint key, const void *val);