Mesa (master): egl: Add _eglSearchPathForEach.

Chia-I Wu olv at kemper.freedesktop.org
Sat May 8 06:59:45 UTC 2010


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

Author: Chia-I Wu <olv at lunarg.com>
Date:   Wed May  5 17:37:19 2010 +0800

egl: Add _eglSearchPathForEach.

The function can be used by a driver to check each search path of EGL.

---

 src/egl/main/egldriver.c |   15 +++++++++++++++
 src/egl/main/egldriver.h |    5 +++++
 2 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/src/egl/main/egldriver.c b/src/egl/main/egldriver.c
index 6384242..052e611 100644
--- a/src/egl/main/egldriver.c
+++ b/src/egl/main/egldriver.c
@@ -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
diff --git a/src/egl/main/egldriver.h b/src/egl/main/egldriver.h
index 5568668..28b7956 100644
--- a/src/egl/main/egldriver.h
+++ b/src/egl/main/egldriver.h
@@ -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);
 
 




More information about the mesa-commit mailing list