summaryrefslogtreecommitdiff
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.h23
1 files changed, 19 insertions, 4 deletions
diff --git a/src/egl/main/eglglobals.h b/src/egl/main/eglglobals.h
index 1a6f12d174..44b4626c58 100644
--- a/src/egl/main/eglglobals.h
+++ b/src/egl/main/eglglobals.h
@@ -5,6 +5,19 @@
#include "eglhash.h"
+/**
+ * Per-thread info
+ */
+struct _egl_thread_info
+{
+ EGLint LastError;
+ _EGLContext *CurrentContext;
+};
+
+
+/**
+ * Global library data
+ */
struct _egl_global
{
EGLBoolean Initialized;
@@ -15,10 +28,8 @@ struct _egl_global
EGLScreenMESA FreeScreenHandle;
- EGLint LastError;
-
- /* XXX this should be per-thread someday */
- _EGLContext *CurrentContext;
+ /* XXX temporary */
+ _EGLThreadInfo ThreadInfo;
};
@@ -33,6 +44,10 @@ extern void
_eglDestroyGlobals(void);
+extern _EGLThreadInfo *
+_eglGetCurrentThread(void);
+
+
extern void
_eglError(EGLint errCode, const char *msg);