X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fegl%2Fmain%2Feglcontext.h;h=4276c0980e297f8f7e47ca9330c8b684ebdac926;hb=413969a92052c019bcf3c5bf48cf564613eba598;hp=2fb28d38b91b205db13285c0fbac5ce6719f9d87;hpb=e87320b5e033a911d4ced2d516e479cdf1bc9228;p=mesa.git diff --git a/src/egl/main/eglcontext.h b/src/egl/main/eglcontext.h index 2fb28d38b91..4276c0980e2 100644 --- a/src/egl/main/eglcontext.h +++ b/src/egl/main/eglcontext.h @@ -15,12 +15,12 @@ struct _egl_context _EGLDisplay *Display; _EGLContext *Next; - _EGLConfig *Config; - + /* The bound status of the context */ + _EGLThreadInfo *Binding; _EGLSurface *DrawSurface; _EGLSurface *ReadSurface; - EGLBoolean IsBound; + _EGLConfig *Config; EGLint ClientAPI; /**< EGL_OPENGL_ES_API, EGL_OPENGL_API, EGL_OPENVG_API */ EGLint ClientVersion; /**< 1 = OpenGLES 1.x, 2 = OpenGLES 2.x */ @@ -51,4 +51,15 @@ _eglMakeCurrent(_EGLDriver *drv, EGLDisplay dpy, EGLSurface draw, EGLSurface rea extern EGLBoolean _eglCopyContextMESA(_EGLDriver *drv, EGLDisplay dpy, EGLContext source, EGLContext dest, EGLint mask); + +/** + * Return true if the context is bound to a thread. + */ +static INLINE EGLBoolean +_eglIsContextBound(_EGLContext *ctx) +{ + return (ctx->Binding != NULL); +} + + #endif /* EGLCONTEXT_INCLUDED */