diff options
author | Chia-I Wu <[email protected]> | 2009-07-17 11:56:00 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-07-17 11:56:00 -0600 |
commit | 15fdbc8361d0b865aea5e2f374b471081ed4214a (patch) | |
tree | f0d15e4fed5f445e9754934e45388522640e906c /src/egl/main/egldisplay.h | |
parent | 3f7e0d5302ed0fadd794a41af6e476d2c408adc7 (diff) |
egl: Remove redundant DeletePending flag.
A context or surface that is neither linked to a display nor current to
a thread should be destroyed. Therefore, an unlinked context or surface
implies a pending delete automatically.
Signed-off-by: Chia-I Wu <[email protected]>
Diffstat (limited to 'src/egl/main/egldisplay.h')
-rw-r--r-- | src/egl/main/egldisplay.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/egl/main/egldisplay.h b/src/egl/main/egldisplay.h index 30b466cb4a0..372ed3cd79a 100644 --- a/src/egl/main/egldisplay.h +++ b/src/egl/main/egldisplay.h @@ -52,6 +52,16 @@ extern _EGLDisplay * _eglLookupDisplay(EGLDisplay dpy); +/** + * Return true if the display is linked. + */ +static INLINE EGLBoolean +_eglIsDisplayLinked(_EGLDisplay *dpy) +{ + return (EGLBoolean) (_eglGetDisplayHandle(dpy) != EGL_NO_DISPLAY); +} + + extern _EGLDisplay * _eglFindDisplay(NativeDisplayType nativeDisplay); @@ -80,6 +90,15 @@ extern _EGLContext * _eglLookupContext(EGLContext ctx); +/** + * Return true if the context is linked to a display. + */ +static INLINE EGLBoolean +_eglIsContextLinked(_EGLContext *ctx) +{ + return (EGLBoolean) (_eglGetContextHandle(ctx) != EGL_NO_CONTEXT); +} + extern EGLSurface _eglLinkSurface(_EGLSurface *surf, _EGLDisplay *dpy); @@ -96,4 +115,14 @@ extern _EGLSurface * _eglLookupSurface(EGLSurface surf); +/** + * Return true if the surface is linked to a display. + */ +static INLINE EGLBoolean +_eglIsSurfaceLinked(_EGLSurface *surf) +{ + return (EGLBoolean) (_eglGetSurfaceHandle(surf) != EGL_NO_SURFACE); +} + + #endif /* EGLDISPLAY_INCLUDED */ |