From 0eaa02c836821556c1e8d0141f49f57e23f2548d Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Thu, 13 Aug 2009 13:01:48 +0800 Subject: 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 --- src/egl/main/eglglobals.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/egl/main/eglglobals.c') diff --git a/src/egl/main/eglglobals.c b/src/egl/main/eglglobals.c index e93b48e03b..a532f142b7 100644 --- a/src/egl/main/eglglobals.c +++ b/src/egl/main/eglglobals.c @@ -1,7 +1,7 @@ #include #include #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 + }, }; -- cgit v1.2.3