diff options
author | Chia-I Wu <olvaffe@gmail.com> | 2009-08-03 11:34:37 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-08-03 11:34:37 -0600 |
commit | 07ee01365a8bddf6f50821ecd585784498a25ff0 (patch) | |
tree | 2d788bcf6cc919b85698080f7e0a8cf447feff59 /src/egl/main/eglsurface.h | |
parent | 27148ccaba9ceee44a3d9fb4649f4a953b3062a7 (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 <olvaffe@gmail.com>
Diffstat (limited to 'src/egl/main/eglsurface.h')
-rw-r--r-- | src/egl/main/eglsurface.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/egl/main/eglsurface.h b/src/egl/main/eglsurface.h index f9413eb9d7..8864176844 100644 --- a/src/egl/main/eglsurface.h +++ b/src/egl/main/eglsurface.h @@ -15,12 +15,12 @@ struct _egl_surface _EGLSurface *Next; EGLSurface Handle; - _EGLConfig *Config; - - /* May need reference counting here */ - EGLBoolean IsBound; + /* The bound status of the surface */ + _EGLContext *Binding; EGLBoolean BoundToTexture; + _EGLConfig *Config; + EGLint Type; /* one of EGL_WINDOW_BIT, EGL_PIXMAP_BIT or EGL_PBUFFER_BIT */ EGLint Width, Height; EGLint TextureFormat, TextureTarget; @@ -100,5 +100,16 @@ _eglCreatePbufferFromClientBuffer(_EGLDriver *drv, EGLDisplay dpy, #endif /* EGL_VERSION_1_2 */ +/** + * Return true if the surface is bound to a thread. + * A surface bound to a texutre is not considered bound by + * this function. + */ +static INLINE EGLBoolean +_eglIsSurfaceBound(_EGLSurface *surf) +{ + return (surf->Binding != NULL); +} + #endif /* EGLSURFACE_INCLUDED */ |