diff options
author | Chia-I Wu <[email protected]> | 2009-08-13 13:01:48 +0800 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-08-18 08:44:44 -0600 |
commit | 0eaa02c836821556c1e8d0141f49f57e23f2548d (patch) | |
tree | 2826cd0917f39dc4913ac089feb2400f5333e258 /src/egl/main/eglglobals.c | |
parent | 2f2cf461c57974abd89e4917945cc8ae6a67a72e (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 <[email protected]>
Diffstat (limited to 'src/egl/main/eglglobals.c')
-rw-r--r-- | src/egl/main/eglglobals.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/egl/main/eglglobals.c b/src/egl/main/eglglobals.c index e93b48e03b8..a532f142b7e 100644 --- a/src/egl/main/eglglobals.c +++ b/src/egl/main/eglglobals.c @@ -1,7 +1,7 @@ #include <stdlib.h> #include <assert.h> #include "eglglobals.h" -#include "egldisplay.h" +#include "egldriver.h" #include "egllog.h" #include "eglmutex.h" @@ -18,8 +18,10 @@ struct _egl_global _eglGlobal = { 0x0 }, /* ClientAPIs */ 0, /* NumDrivers */ { NULL }, /* Drivers */ - 0, /* NumAtExitCalls */ - { NULL }, /* AtExitCalls */ + 1, /* NumAtExitCalls */ + { /* AtExitCalls */ + _eglUnloadDrivers + }, }; |