summaryrefslogtreecommitdiff
path: root/src/egl/main/eglcontext.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2005-12-10 17:54:00 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2005-12-10 17:54:00 +0000
commit48822796339cb4a55714dc3f1abbe379562ec538 (patch)
tree83a6ab54af6a26242b0176f82d67c7c0e66ff776 /src/egl/main/eglcontext.c
parentb04dd5c58763039a564c50b5e3c0bbc9755e7f72 (diff)
Some initial per-thread support.
Rename eglShowSurfaceMESA to eglShowScreenSurfaceMESA.
Diffstat (limited to 'src/egl/main/eglcontext.c')
-rw-r--r--src/egl/main/eglcontext.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/egl/main/eglcontext.c b/src/egl/main/eglcontext.c
index b760ebcb40..07b63e9b11 100644
--- a/src/egl/main/eglcontext.c
+++ b/src/egl/main/eglcontext.c
@@ -87,8 +87,8 @@ _eglLookupContext(EGLContext ctx)
_EGLContext *
_eglGetCurrentContext(void)
{
- /* XXX this should be per-thread someday */
- return _eglGlobal.CurrentContext;
+ _EGLThreadInfo *t = _eglGetCurrentThread();
+ return t->CurrentContext;
}
@@ -176,6 +176,7 @@ EGLBoolean
_eglMakeCurrent(_EGLDriver *drv, EGLDisplay dpy, EGLSurface d,
EGLSurface r, EGLContext context)
{
+ _EGLThreadInfo *t = _eglGetCurrentThread();
_EGLContext *ctx = _eglLookupContext(context);
_EGLSurface *draw = _eglLookupSurface(d);
_EGLSurface *read = _eglLookupSurface(r);
@@ -250,7 +251,7 @@ _eglMakeCurrent(_EGLDriver *drv, EGLDisplay dpy, EGLSurface d,
read->IsBound = EGL_TRUE;
}
- _eglGlobal.CurrentContext = ctx;
+ t->CurrentContext = ctx;
return EGL_TRUE;
}