summaryrefslogtreecommitdiffstats
path: root/src/egl/main/eglcontext.c
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2009-08-03 11:34:37 -0600
committerBrian Paul <[email protected]>2009-08-03 11:34:37 -0600
commit07ee01365a8bddf6f50821ecd585784498a25ff0 (patch)
tree2d788bcf6cc919b85698080f7e0a8cf447feff59 /src/egl/main/eglcontext.c
parent27148ccaba9ceee44a3d9fb4649f4a953b3062a7 (diff)
egl: Replace IsBound by a pointer to the binding.
IsBound tells if a context or surface is current. What it does not tell is, to which thread a context is current, or to which context a surface is current. This commit replaces IsBound by a pointer to the binding thread or context. Signed-off-by: Chia-I Wu <[email protected]>
Diffstat (limited to 'src/egl/main/eglcontext.c')
-rw-r--r--src/egl/main/eglcontext.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/egl/main/eglcontext.c b/src/egl/main/eglcontext.c
index 9ab4286d3a8..f8d5687f87c 100644
--- a/src/egl/main/eglcontext.c
+++ b/src/egl/main/eglcontext.c
@@ -96,7 +96,7 @@ _eglDestroyContext(_EGLDriver *drv, EGLDisplay dpy, EGLContext ctx)
_EGLContext *context = _eglLookupContext(ctx);
if (context) {
_eglUnlinkContext(context);
- if (!context->IsBound)
+ if (!_eglIsContextBound(context))
free(context);
return EGL_TRUE;
}
@@ -207,7 +207,7 @@ _eglMakeCurrent(_EGLDriver *drv, EGLDisplay dpy, EGLSurface d,
* check if the old context or surfaces need to be deleted
*/
if (oldDrawSurface != NULL) {
- oldDrawSurface->IsBound = EGL_FALSE;
+ oldDrawSurface->Binding = NULL;
if (!_eglIsSurfaceLinked(oldDrawSurface)) {
/* make sure we don't try to rebind a deleted surface */
if (draw == oldDrawSurface || draw == oldReadSurface) {
@@ -218,7 +218,7 @@ _eglMakeCurrent(_EGLDriver *drv, EGLDisplay dpy, EGLSurface d,
}
}
if (oldReadSurface != NULL && oldReadSurface != oldDrawSurface) {
- oldReadSurface->IsBound = EGL_FALSE;
+ oldReadSurface->Binding = NULL;
if (!_eglIsSurfaceLinked(oldReadSurface)) {
/* make sure we don't try to rebind a deleted surface */
if (read == oldDrawSurface || read == oldReadSurface) {
@@ -229,7 +229,7 @@ _eglMakeCurrent(_EGLDriver *drv, EGLDisplay dpy, EGLSurface d,
}
}
if (oldContext != NULL) {
- oldContext->IsBound = EGL_FALSE;
+ oldContext->Binding = NULL;
if (!_eglIsContextLinked(oldContext)) {
/* make sure we don't try to rebind a deleted context */
if (ctx == oldContext) {
@@ -248,9 +248,9 @@ _eglMakeCurrent(_EGLDriver *drv, EGLDisplay dpy, EGLSurface d,
}
ctx->DrawSurface = draw;
ctx->ReadSurface = read;
- ctx->IsBound = EGL_TRUE;
- draw->IsBound = EGL_TRUE;
- read->IsBound = EGL_TRUE;
+ ctx->Binding = t;
+ draw->Binding = ctx;
+ read->Binding = ctx;
t->CurrentContexts[apiIndex] = ctx;
}
else {