[GTK] ANGLE's eglplatform.h does not support Wayland-only builds
authoraperez@igalia.com <aperez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Sep 2018 19:59:52 +0000 (19:59 +0000)
committeraperez@igalia.com <aperez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Sep 2018 19:59:52 +0000 (19:59 +0000)
https://bugs.webkit.org/show_bug.cgi?id=189844

Reviewed by Michael Catanzaro.

This makes it possible to build WebKitGTK+ after r225340 when the
build is configured to support only Wayland, and the X11 headers
are not present.

* changes.diff: Updated.
* include/EGL/eglplatform.h: Include the X11 headers only when
ANGLE_USE_X11 is defined and, for consistency with Mesa's version
of the header, when MESA_EGL_NO_X11_HEADERS is not defined.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236349 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/ThirdParty/ANGLE/ChangeLog
Source/ThirdParty/ANGLE/changes.diff
Source/ThirdParty/ANGLE/include/EGL/eglplatform.h

index 3a2b1db..ecbc3a5 100644 (file)
@@ -1,3 +1,19 @@
+2018-09-21  Adrian Perez de Castro  <aperez@igalia.com>
+
+        [GTK] ANGLE's eglplatform.h does not support Wayland-only builds
+        https://bugs.webkit.org/show_bug.cgi?id=189844
+
+        Reviewed by Michael Catanzaro.
+
+        This makes it possible to build WebKitGTK+ after r225340 when the
+        build is configured to support only Wayland, and the X11 headers
+        are not present.
+
+        * changes.diff: Updated.
+        * include/EGL/eglplatform.h: Include the X11 headers only when
+        ANGLE_USE_X11 is defined and, for consistency with Mesa's version
+        of the header, when MESA_EGL_NO_X11_HEADERS is not defined.
+
 2018-08-29  David Kilzer  <ddkilzer@apple.com>
 
         Remove empty directories from from svn.webkit.org repository
index eacfee9..c3afb79 100644 (file)
@@ -8079,3 +8079,31 @@ index 333448be348..47d18093c96 100644
  
  typedef intptr_t EGLNativeDisplayType;
  typedef intptr_t EGLNativeWindowType;
+diff --git a/include/EGL/eglplatform.h b/include/EGL/eglplatform.h
+index 47d18093c96..e781564891d 100644
+--- a/include/EGL/eglplatform.h
++++ b/include/EGL/eglplatform.h
+@@ -114,6 +114,8 @@ typedef struct wl_egl_window *EGLNativeWindowType;
+ #elif defined(__unix__)
++#if defined(ANGLE_USE_X11) && !defined(MESA_EGL_NO_X11_HEADERS)
++
+ /* X11 (tentative)  */
+ #include <X11/Xlib.h>
+ #include <X11/Xutil.h>
+@@ -122,6 +124,14 @@ typedef Display *EGLNativeDisplayType;
+ typedef Pixmap   EGLNativePixmapType;
+ typedef Window   EGLNativeWindowType;
++#else
++
++typedef void             *EGLNativeDisplayType;
++typedef khronos_uintptr_t EGLNativePixmapType;
++typedef khronos_uintptr_t EGLNativeWindowType;
++
++#endif /* ANGLE_USE_X11 && !MESA_EGL_NO_X11_HEADERS */
++
+ #else
+ #error "Platform not recognized"
+ #endif
index 47d1809..e781564 100644 (file)
@@ -114,6 +114,8 @@ typedef struct wl_egl_window *EGLNativeWindowType;
 
 #elif defined(__unix__)
 
+#if defined(ANGLE_USE_X11) && !defined(MESA_EGL_NO_X11_HEADERS)
+
 /* X11 (tentative)  */
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
@@ -123,6 +125,14 @@ typedef Pixmap   EGLNativePixmapType;
 typedef Window   EGLNativeWindowType;
 
 #else
+
+typedef void             *EGLNativeDisplayType;
+typedef khronos_uintptr_t EGLNativePixmapType;
+typedef khronos_uintptr_t EGLNativeWindowType;
+
+#endif /* ANGLE_USE_X11 && !MESA_EGL_NO_X11_HEADERS */
+
+#else
 #error "Platform not recognized"
 #endif