diff options
author | Chia-I Wu <[email protected]> | 2010-01-30 22:45:54 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2010-01-30 22:57:18 +0800 |
commit | 00e1790f3230de550121591d611b47da299ae15c (patch) | |
tree | c4772bcf9cee8de57e7a21ef2810e561ee577a6e /src/egl/main | |
parent | 94cb321b5d246185abf71d89968d472a626f1a23 (diff) |
egl: Rename Binding to CurrentContext in _EGLSurface.
A context can be bound to a surface just like it can be bound to a
thread. CurrentContext is a more consistent name.
Diffstat (limited to 'src/egl/main')
-rw-r--r-- | src/egl/main/eglcontext.c | 16 | ||||
-rw-r--r-- | src/egl/main/eglsurface.h | 14 |
2 files changed, 15 insertions, 15 deletions
diff --git a/src/egl/main/eglcontext.c b/src/egl/main/eglcontext.c index ee9d60e17a6..37c4b25b68a 100644 --- a/src/egl/main/eglcontext.c +++ b/src/egl/main/eglcontext.c @@ -150,13 +150,13 @@ _eglBindContextToSurfaces(_EGLContext *ctx, { _EGLSurface *newDraw = *draw, *newRead = *read; - if (newDraw->Binding) - newDraw->Binding->DrawSurface = NULL; - newDraw->Binding = ctx; + if (newDraw->CurrentContext) + newDraw->CurrentContext->DrawSurface = NULL; + newDraw->CurrentContext = ctx; - if (newRead->Binding) - newRead->Binding->ReadSurface = NULL; - newRead->Binding = ctx; + if (newRead->CurrentContext) + newRead->CurrentContext->ReadSurface = NULL; + newRead->CurrentContext = ctx; if (ctx) { *draw = ctx->DrawSurface; @@ -238,8 +238,8 @@ _eglCheckMakeCurrent(_EGLContext *ctx, _EGLSurface *draw, _EGLSurface *read) * * The latter is more restrictive so we can check only the latter case. */ - if ((draw->Binding && draw->Binding != ctx) || - (read->Binding && read->Binding != ctx)) + if ((draw->CurrentContext && draw->CurrentContext != ctx) || + (read->CurrentContext && read->CurrentContext != ctx)) return _eglError(EGL_BAD_ACCESS, "eglMakeCurrent"); /* simply require the configs to be equal */ diff --git a/src/egl/main/eglsurface.h b/src/egl/main/eglsurface.h index 4062b990fa4..eee66f6d861 100644 --- a/src/egl/main/eglsurface.h +++ b/src/egl/main/eglsurface.h @@ -14,9 +14,8 @@ struct _egl_surface /* A surface is a display resource */ _EGLResource Resource; - /* The bound status of the surface */ - _EGLContext *Binding; - EGLBoolean BoundToTexture; + /* The context that is currently bound to the surface */ + _EGLContext *CurrentContext; _EGLConfig *Config; @@ -26,6 +25,9 @@ struct _egl_surface EGLint MipmapTexture, MipmapLevel; EGLint SwapInterval; + /* True if the surface is bound to an OpenGL ES texture */ + EGLBoolean BoundToTexture; + /* If type == EGL_SCREEN_BIT: */ EGLint VisibleRefCount; /* number of screens I'm displayed on */ @@ -100,14 +102,12 @@ _eglCreatePbufferFromClientBuffer(_EGLDriver *drv, _EGLDisplay *dpy, /** - * Return true if the surface is bound to a thread. - * A surface bound to a texutre is not considered bound by - * this function. + * Return true if there is a context bound to the surface. */ static INLINE EGLBoolean _eglIsSurfaceBound(_EGLSurface *surf) { - return (surf->Binding != NULL); + return (surf->CurrentContext != NULL); } |