X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fegl%2Fmain%2Feglsurface.h;h=886417684494a65f62251b490164321132d70c94;hb=621801abd287238f9a3209554bc84fec5d2e9ccd;hp=f9413eb9d75a78687bd11fd1233c0dd5f4deca2f;hpb=288299ae12603cf7ab0388db426d764c3f31304e;p=mesa.git diff --git a/src/egl/main/eglsurface.h b/src/egl/main/eglsurface.h index f9413eb9d75..88641768449 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 */