summaryrefslogtreecommitdiffstats
path: root/src/egl/main
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2010-01-19 17:39:34 +0800
committerChia-I Wu <[email protected]>2010-01-20 17:40:07 +0800
commitf0c2871bf4f6fa89339347bb9767bb2c19fda6d0 (patch)
tree9290700850bb6845dc8741a65098d2c9c3a6d556 /src/egl/main
parent57929eda3e876dc60be7060237a669f042be2376 (diff)
egl: Remove unused driver and display functions.
Remove _eglPreloadDriver, _eglLookupDriver, and _eglSplitDisplayString.
Diffstat (limited to 'src/egl/main')
-rw-r--r--src/egl/main/egldisplay.c30
-rw-r--r--src/egl/main/egldisplay.h4
-rw-r--r--src/egl/main/egldriver.c114
-rw-r--r--src/egl/main/egldriver.h8
4 files changed, 0 insertions, 156 deletions
diff --git a/src/egl/main/egldisplay.c b/src/egl/main/egldisplay.c
index a65ac6e969c..eb82af48842 100644
--- a/src/egl/main/egldisplay.c
+++ b/src/egl/main/egldisplay.c
@@ -40,36 +40,6 @@ _eglFiniDisplay(void)
/**
- * If the first character is '!' we interpret it as specific driver name
- * (i.e. "!r200" or "!i830"). Whatever follows ':' is interpreted as
- * arguments.
- *
- * The caller may free() the returned driver name.
- */
-char *
-_eglSplitDisplayString(const char *dpyString, const char **args)
-{
- char *drv, *p;
-
- if (!dpyString || dpyString[0] != '!')
- return NULL;
- drv = _eglstrdup(dpyString + 1);
- if (!drv)
- return NULL;
-
- p = strchr(dpyString, ':');
- if (p) {
- drv[p - dpyString] = '\0';
- p++;
- }
- if (args)
- *args = p;
-
- return drv;
-}
-
-
-/**
* Allocate a new _EGLDisplay object for the given nativeDisplay handle.
* We'll also try to determine the device driver name at this time.
*
diff --git a/src/egl/main/egldisplay.h b/src/egl/main/egldisplay.h
index 4f619e53710..ddd98069859 100644
--- a/src/egl/main/egldisplay.h
+++ b/src/egl/main/egldisplay.h
@@ -58,10 +58,6 @@ extern void
_eglFiniDisplay(void);
-extern char *
-_eglSplitDisplayString(const char *dpyString, const char **args);
-
-
extern _EGLDisplay *
_eglNewDisplay(NativeDisplayType displayName);
diff --git a/src/egl/main/egldriver.c b/src/egl/main/egldriver.c
index 5d603419a8a..873dac02bfc 100644
--- a/src/egl/main/egldriver.c
+++ b/src/egl/main/egldriver.c
@@ -114,66 +114,6 @@ library_suffix(void)
/**
- * Choose a driver for a given display.
- * The caller may free() the returned strings.
- */
-static char *
-_eglChooseDriver(_EGLDisplay *dpy, char **argsRet)
-{
- char *path = NULL;
- const char *args = NULL;
- const char *suffix = NULL;
- const char *p;
-
- path = getenv("EGL_DRIVER");
- if (path)
- path = _eglstrdup(path);
-
-#if defined(_EGL_PLATFORM_X)
- if (!path && dpy && dpy->NativeDisplay) {
- /* assume (wrongly!) that the native display is a display string */
- path = _eglSplitDisplayString((const char *) dpy->NativeDisplay, &args);
- }
- suffix = "so";
-#elif defined(_EGL_PLATFORM_WINDOWS)
- suffix = "dll";
-#else /* _EGL_PLATFORM_NO_OS */
- if (path) {
- /* force the use of the default driver */
- _eglLog(_EGL_DEBUG, "ignore EGL_DRIVER");
- free(path);
- path = NULL;
- }
- suffix = NULL;
-#endif
-
- if (!path)
- path = _eglstrdup(DefaultDriverName);
-
- /* append suffix if there isn't */
- p = strrchr(path, '.');
- if (!p && suffix) {
- size_t len = strlen(path);
- char *tmp = malloc(len + strlen(suffix) + 2);
- if (tmp) {
- memcpy(tmp, path, len);
- tmp[len++] = '.';
- tmp[len] = '\0';
- strcat(tmp + len, suffix);
-
- free(path);
- path = tmp;
- }
- }
-
- if (argsRet)
- *argsRet = (args) ? _eglstrdup(args) : NULL;
-
- return path;
-}
-
-
-/**
* Open the named driver and find its bootstrap function: _eglMain().
*/
static _EGLMain_t
@@ -308,46 +248,6 @@ _eglMatchDriver(_EGLDisplay *dpy)
/**
- * Load a driver and save it.
- */
-const char *
-_eglPreloadDriver(_EGLDisplay *dpy)
-{
- char *path, *args;
- _EGLDriver *drv;
- EGLint i;
-
- path = _eglChooseDriver(dpy, &args);
- if (!path)
- return NULL;
-
- for (i = 0; i < _eglGlobal.NumDrivers; i++) {
- drv = _eglGlobal.Drivers[i];
- if (strcmp(drv->Path, path) == 0) {
- _eglLog(_EGL_DEBUG, "Driver %s is already preloaded",
- drv->Name);
- free(path);
- if (args)
- free(args);
- return drv->Name;
- }
- }
-
- drv = _eglLoadDriver(path, args);
- if (!drv) {
- free(path);
- if (args)
- free(args);
- return NULL;
- }
-
- _eglGlobal.Drivers[_eglGlobal.NumDrivers++] = drv;
-
- return drv->Name;
-}
-
-
-/**
* Open a preloaded driver.
*/
_EGLDriver *
@@ -559,20 +459,6 @@ _eglUnloadDrivers(void)
/**
- * Given a display handle, return the _EGLDriver for that display.
- */
-_EGLDriver *
-_eglLookupDriver(EGLDisplay dpy)
-{
- _EGLDisplay *d = _eglLookupDisplay(dpy);
- if (d)
- return d->Driver;
- else
- return NULL;
-}
-
-
-/**
* Plug all the available fallback routines into the given driver's
* dispatch table.
*/
diff --git a/src/egl/main/egldriver.h b/src/egl/main/egldriver.h
index a474fa68716..eca96fce61d 100644
--- a/src/egl/main/egldriver.h
+++ b/src/egl/main/egldriver.h
@@ -29,10 +29,6 @@ PUBLIC _EGLDriver *
_eglMain(const char *args);
-extern const char *
-_eglPreloadDriver(_EGLDisplay *dpy);
-
-
extern _EGLDriver *
_eglOpenDriver(_EGLDisplay *dpy);
@@ -49,10 +45,6 @@ extern void
_eglUnloadDrivers(void);
-extern _EGLDriver *
-_eglLookupDriver(EGLDisplay d);
-
-
PUBLIC void
_eglInitDriverFallbacks(_EGLDriver *drv);