summaryrefslogtreecommitdiff
path: root/src/egl/main/egldisplay.c
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/egldisplay.c
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/egldisplay.c')
-rw-r--r--src/egl/main/egldisplay.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/egl/main/egldisplay.c b/src/egl/main/egldisplay.c
index c684e4291e..ba7e634c9d 100644
--- a/src/egl/main/egldisplay.c
+++ b/src/egl/main/egldisplay.c
@@ -94,7 +94,7 @@ _eglNewDisplay(NativeDisplayType nativeDisplay)
_eglInitDisplay();
dpy->SurfaceHash = _eglSurfaceHash;
- dpy->DriverName = _eglChooseDriver(dpy);
+ dpy->DriverName = _eglPreloadDriver(dpy);
if (!dpy->DriverName) {
free(dpy);
return NULL;
@@ -244,11 +244,6 @@ _eglCleanupDisplay(_EGLDisplay *disp)
disp->Configs = NULL;
/* XXX incomplete */
-
- free((void *) disp->DriverName);
- disp->DriverName = NULL;
-
- /* driver deletes the _EGLDisplay object */
}