Merge branch 'asm-shader-rework-1'
[mesa.git] / src / egl / main / egldisplay.h
index 6394c9cedba4853ec8da569085bec6beea66bdbb..c7a41cd588358c266f42ee332639dc50e25ef1bb 100644 (file)
@@ -65,6 +65,10 @@ extern void
 _eglFiniDisplay(void);
 
 
+extern char *
+_eglSplitDisplayString(const char *dpyString, const char **args);
+
+
 extern _EGLDisplay *
 _eglNewDisplay(NativeDisplayType displayName);
 
@@ -125,14 +129,17 @@ _eglCheckSurfaceHandle(EGLSurface surf, _EGLDisplay *dpy);
 /* Only do a quick check.  This is NOT standard compliant. */
 
 static INLINE EGLBoolean
-_eglCheckDisplayHandle(EGLDisplay dpy) { return EGL_TRUE; }
+_eglCheckDisplayHandle(EGLDisplay dpy)
+{
+   return ((_EGLDisplay *) dpy != NULL);
+}
 
 
 static INLINE EGLBoolean
 _eglCheckContextHandle(EGLContext ctx, _EGLDisplay *dpy)
 {
    _EGLContext *c = (_EGLContext *) ctx;
-   return (c && c->Display == dpy);
+   return (dpy && c && c->Display == dpy);
 }
 
 
@@ -140,7 +147,7 @@ static INLINE EGLBoolean
 _eglCheckSurfaceHandle(EGLSurface surf, _EGLDisplay *dpy)
 {
    _EGLSurface *s = (_EGLSurface *) surf;
-   return (s && s->Display == dpy);
+   return (dpy && s && s->Display == dpy);
 }