diff options
author | Brian Paul <[email protected]> | 2005-12-10 17:54:00 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2005-12-10 17:54:00 +0000 |
commit | 48822796339cb4a55714dc3f1abbe379562ec538 (patch) | |
tree | 83a6ab54af6a26242b0176f82d67c7c0e66ff776 /src/egl/main/eglcontext.c | |
parent | b04dd5c58763039a564c50b5e3c0bbc9755e7f72 (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.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/egl/main/eglcontext.c b/src/egl/main/eglcontext.c index b760ebcb40a..07b63e9b112 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; } |