summaryrefslogtreecommitdiff
path: root/src/egl/main/egldriver.h
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2009-08-13 13:01:48 +0800
committerBrian Paul <brianp@vmware.com>2009-08-18 08:44:44 -0600
commit0eaa02c836821556c1e8d0141f49f57e23f2548d (patch)
tree2826cd0917f39dc4913ac089feb2400f5333e258 /src/egl/main/egldriver.h
parent2f2cf461c57974abd89e4917945cc8ae6a67a72e (diff)
egl: Change the way drivers are loaded.
Driver is chosen and preloaded when eglGetDisplay is called. Later when eglInitialize is called, the same driver is matched to initialize the display. Also, add new, but unused, hooks to EGLDriver to allow a driver to probe a display or unload itself. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Diffstat (limited to 'src/egl/main/egldriver.h')
-rw-r--r--src/egl/main/egldriver.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/egl/main/egldriver.h b/src/egl/main/egldriver.h
index d97a24db1d5..430c0949d44 100644
--- a/src/egl/main/egldriver.h
+++ b/src/egl/main/egldriver.h
@@ -27,8 +27,14 @@ struct _egl_driver
EGLBoolean Initialized; /**< set by driver after initialized */
void *LibHandle; /**< dlopen handle */
+ const char *Path; /**< path to this driver */
+ const char *Args; /**< args to load this driver */
const char *Name; /**< name of this driver */
+ /**< probe a display to see if it is supported */
+ EGLBoolean (*Probe)(_EGLDriver *drv, _EGLDisplay *dpy);
+ /**< called before dlclose to release this driver */
+ void (*Unload)(_EGLDriver *drv);
int APImajor, APIminor; /**< as returned by eglInitialize() */
char Version[1000]; /**< initialized from APImajor/minor, Name */
@@ -50,20 +56,21 @@ extern _EGLDriver *_eglMain(_EGLDisplay *dpy, const char *args);
extern const char *
_eglChooseDRMDriver(int card);
+
extern const char *
-_eglChooseDriver(_EGLDisplay *dpy);
+_eglPreloadDriver(_EGLDisplay *dpy);
extern _EGLDriver *
-_eglOpenDriver(_EGLDisplay *dpy, const char *driverName, const char *args);
+_eglOpenDriver(_EGLDisplay *dpy);
extern EGLBoolean
_eglCloseDriver(_EGLDriver *drv, _EGLDisplay *dpy);
-extern void
-_eglSaveDriver(_EGLDriver *drv);
+void
+_eglUnloadDrivers(void);
extern _EGLDriver *