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.h53
1 files changed, 6 insertions, 47 deletions
diff --git a/src/egl/main/egldisplay.h b/src/egl/main/egldisplay.h
index 03903290fd..21bf22b5fe 100644
--- a/src/egl/main/egldisplay.h
+++ b/src/egl/main/egldisplay.h
@@ -4,6 +4,7 @@
#include "egltypedefs.h"
#include "egldefines.h"
+#include "eglmutex.h"
enum _egl_resource_type {
@@ -13,6 +14,8 @@ enum _egl_resource_type {
_EGL_NUM_RESOURCES
};
+/* this cannot and need not go into egltypedefs.h */
+typedef enum _egl_resource_type _EGLResourceType;
/**
@@ -53,6 +56,8 @@ struct _egl_display
/* used to link displays */
_EGLDisplay *Next;
+ _EGLMutex Mutex;
+
EGLNativeDisplayType NativeDisplay;
EGLBoolean Initialized; /**< True if the display is initialized */
@@ -85,19 +90,7 @@ _eglFiniDisplay(void);
extern _EGLDisplay *
-_eglNewDisplay(EGLNativeDisplayType displayName);
-
-
-extern EGLDisplay
-_eglLinkDisplay(_EGLDisplay *dpy);
-
-
-extern void
-_eglUnlinkDisplay(_EGLDisplay *dpy);
-
-
-extern _EGLDisplay *
-_eglFindDisplay(EGLNativeDisplayType nativeDisplay);
+_eglFindDisplay(EGLNativeDisplayType displayName);
PUBLIC void
@@ -108,9 +101,6 @@ PUBLIC void
_eglCleanupDisplay(_EGLDisplay *disp);
-#ifndef _EGL_SKIP_HANDLE_CHECK
-
-
extern EGLBoolean
_eglCheckDisplayHandle(EGLDisplay dpy);
@@ -119,27 +109,6 @@ PUBLIC EGLBoolean
_eglCheckResource(void *res, _EGLResourceType type, _EGLDisplay *dpy);
-#else /* !_EGL_SKIP_HANDLE_CHECK */
-
-/* Only do a quick check. This is NOT standard compliant. */
-
-static INLINE EGLBoolean
-_eglCheckDisplayHandle(EGLDisplay dpy)
-{
- return ((_EGLDisplay *) dpy != NULL);
-}
-
-
-static INLINE EGLBoolean
-_eglCheckResource(void *res, _EGLResourceType type, _EGLDisplay *dpy);
-{
- return (((_EGLResource *) res)->Display == dpy);
-}
-
-
-#endif /* _EGL_SKIP_HANDLE_CHECK */
-
-
/**
* Lookup a handle to find the linked display.
* Return NULL if the handle has no corresponding linked display.
@@ -164,16 +133,6 @@ _eglGetDisplayHandle(_EGLDisplay *dpy)
}
-/**
- * Return true if the display is linked.
- */
-static INLINE EGLBoolean
-_eglIsDisplayLinked(_EGLDisplay *dpy)
-{
- return (EGLBoolean) (_eglGetDisplayHandle(dpy) != EGL_NO_DISPLAY);
-}
-
-
extern void
_eglLinkResource(_EGLResource *res, _EGLResourceType type, _EGLDisplay *dpy);