egl: Add _eglSearchPathForEach.

The function can be used by a driver to check each search path of EGL.
This commit is contained in:
Chia-I Wu
2010-05-05 17:37:19 +08:00
parent 74fb08018a
commit e8ba2812e6
2 changed files with 20 additions and 0 deletions
+15
View File
@@ -652,6 +652,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.
*
+5
View File
@@ -88,6 +88,11 @@ PUBLIC void
_eglInitDriverFallbacks(_EGLDriver *drv);
PUBLIC void
_eglSearchPathForEach(EGLBoolean (*callback)(const char *, size_t, void *),
void *callback_data);
PUBLIC void
_eglSetProbeCache(EGLint key, const void *val);