summaryrefslogtreecommitdiff
path: root/src/egl/main/egldisplay.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/egl/main/egldisplay.h')
-rw-r--r--src/egl/main/egldisplay.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/egl/main/egldisplay.h b/src/egl/main/egldisplay.h
index 30b466cb4a..372ed3cd79 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 */