From 48822796339cb4a55714dc3f1abbe379562ec538 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 10 Dec 2005 17:54:00 +0000 Subject: Some initial per-thread support. Rename eglShowSurfaceMESA to eglShowScreenSurfaceMESA. --- src/egl/main/eglcontext.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/egl/main/eglcontext.c') 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; } -- cgit v1.2.3