summaryrefslogtreecommitdiff
path: root/src/egl/main/egldriver.c
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-05-05 17:37:19 +0800
committerChia-I Wu <olv@lunarg.com>2010-05-08 14:54:13 +0800
commite8ba2812e6995d1ec95c972a1b48ac29a99531dd (patch)
treecd6e9f4b7f88aae8e08e994cf6aa5f298463d5f1 /src/egl/main/egldriver.c
parent74fb08018ac740e8189cee5f9aa8e429d50496e4 (diff)
egl: Add _eglSearchPathForEach.
The function can be used by a driver to check each search path of EGL.
Diffstat (limited to 'src/egl/main/egldriver.c')
-rw-r--r--src/egl/main/egldriver.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/egl/main/egldriver.c b/src/egl/main/egldriver.c
index 6384242b09..052e6110bf 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