summaryrefslogtreecommitdiffstats
path: root/src/egl/main/eglglobals.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/egl/main/eglglobals.h')
-rw-r--r--src/egl/main/eglglobals.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/src/egl/main/eglglobals.h b/src/egl/main/eglglobals.h
new file mode 100644
index 00000000000..c16baa2d6bd
--- /dev/null
+++ b/src/egl/main/eglglobals.h
@@ -0,0 +1,68 @@
+#ifndef EGLGLOBALS_INCLUDED
+#define EGLGLOBALS_INCLUDED
+
+#include "egltypedefs.h"
+#include "eglhash.h"
+
+
+/**
+ * Per-thread info
+ */
+struct _egl_thread_info
+{
+ EGLint LastError;
+ _EGLContext *CurrentContext;
+ EGLenum CurrentAPI;
+};
+
+
+/**
+ * Global library data
+ */
+struct _egl_global
+{
+ EGLBoolean Initialized;
+
+ _EGLHashtable *Displays;
+ _EGLHashtable *Contexts;
+ _EGLHashtable *Surfaces;
+
+ EGLScreenMESA FreeScreenHandle;
+
+ /* XXX these may be temporary */
+ EGLBoolean OpenGLESAPISupported;
+ EGLBoolean OpenVGAPISupported;
+
+ /* XXX temporary - should be thread-specific data (TSD) */
+ _EGLThreadInfo *ThreadInfo;
+};
+
+
+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);
+
+
+#endif /* EGLGLOBALS_INCLUDED */