diff options
Diffstat (limited to 'src/egl/main/eglglobals.h')
-rw-r--r-- | src/egl/main/eglglobals.h | 51 |
1 files changed, 10 insertions, 41 deletions
diff --git a/src/egl/main/eglglobals.h b/src/egl/main/eglglobals.h index 14d8ea487af..58511076d45 100644 --- a/src/egl/main/eglglobals.h +++ b/src/egl/main/eglglobals.h @@ -2,18 +2,9 @@ #define EGLGLOBALS_INCLUDED #include "egltypedefs.h" -#include "eglhash.h" - - -/** - * Per-thread info - */ -struct _egl_thread_info -{ - EGLint LastError; - _EGLContext *CurrentContext; - EGLenum CurrentAPI; -}; +#include "egldisplay.h" +#include "eglcurrent.h" +#include "eglmutex.h" /** @@ -21,23 +12,21 @@ struct _egl_thread_info */ struct _egl_global { - EGLBoolean Initialized; + _EGLMutex *Mutex; - _EGLHashtable *Displays; - _EGLHashtable *Surfaces; + /* the list of all displays */ + _EGLDisplay *DisplayList; EGLScreenMESA FreeScreenHandle; /* bitmaks of supported APIs (supported by _some_ driver) */ EGLint ClientAPIsMask; - char ClientAPIs[1000]; /**< updated by eglQueryString */ - - /* XXX temporary - should be thread-specific data (TSD) */ - _EGLThreadInfo *ThreadInfo; - EGLint NumDrivers; _EGLDriver *Drivers[10]; + + EGLint NumAtExitCalls; + void (*AtExitCalls[10])(void); }; @@ -45,27 +34,7 @@ extern struct _egl_global _eglGlobal; extern void -_eglInitGlobals(void); - - -extern void -_eglDestroyGlobals(void); - - -extern _EGLThreadInfo * -_eglNewThreadInfo(void); - - -extern void -_eglDeleteThreadData(_EGLThreadInfo *t); - - -extern _EGLThreadInfo * -_eglGetCurrentThread(void); - - -extern void -_eglError(EGLint errCode, const char *msg); +_eglAddAtExitCall(void (*func)(void)); #endif /* EGLGLOBALS_INCLUDED */ |