+2015-06-16 Carlos Alberto Lopez Perez <clopez@igalia.com>
+
+ [GTK] [Wayland] Should be possible to build with support for both X11 and Wayland.
+ https://bugs.webkit.org/show_bug.cgi?id=145701
+
+ Reviewed by Darin Adler.
+
+ * Source/cmake/OptionsGTK.cmake: Remove conflicting options.
+
2015-06-15 Jon Honeycutt <jhoneycutt@apple.com>
[iOS] Crash long pressing on <input type=file>
+2015-06-16 Carlos Alberto Lopez Perez <clopez@igalia.com>
+
+ [GTK] [Wayland] Should be possible to build with support for both X11 and Wayland.
+ https://bugs.webkit.org/show_bug.cgi?id=145701
+
+ Reviewed by Darin Adler.
+
+ No new tests, no behavior changes.
+
+ When building both targets, we have to include the wayland-egl
+ headers in order to build the Wayland target. This causes that
+ EGLNativePixmapType and EGLNativeWindowType get defined as
+ different types than when building only the X11 target.
+
+ By type casting them to the ones that are expected, we are able
+ to build both targets at the same time.
+
+ I have done tests (building each target alone as also both targets
+ at the same time), and everything seems to works as expected.
+
+ Once built for both targets, if you try to launch the MiniBrowser
+ from inside a Wayland compositor (Weston on top of X for example),
+ it will trigger the X11 target if the DISPLAY environment variable
+ is set and the environment variable GDK_BACKEND is not set to wayland,
+ otherwise it will trigger the Wayland target.
+
+ * platform/graphics/GLContext.cpp:
+ (WebCore::GLContext::createContextForWindow): Add type casts. We have
+ to consider here two different type casts depending on the type of
+ GLNativeWindowType to avoid a build failure on 32-bits platforms.
+ The static_cast one was already beeing done as an implicit cast
+ (from uint64_t to XID), the reinterpret_cast is the new one that
+ we need to do only when building on both platforms.
+ * platform/graphics/egl/GLContextEGL.cpp: Add missing include when
+ building both targets that is required for defining DefaultRootWindow().
+ (WebCore::GLContextEGL::createPixmapContext): Add type cast.
+
2015-06-15 Jon Honeycutt <jhoneycutt@apple.com>
[iOS] Crash long pressing on <input type=file>
#endif
#if USE(GLX)
- if (auto glxContext = GLContextGLX::createContext(windowHandle, sharingContext))
+#if PLATFORM(WAYLAND) // Building both X11 and Wayland targets
+ XID GLXWindowHandle = reinterpret_cast<XID>(windowHandle);
+#else
+ XID GLXWindowHandle = static_cast<XID>(windowHandle);
+#endif
+ if (auto glxContext = GLContextGLX::createContext(GLXWindowHandle, sharingContext))
return WTF::move(glxContext);
#endif
#if USE(EGL)
#if PLATFORM(X11)
#include "PlatformDisplayX11.h"
+#include <X11/Xlib.h>
#endif
#if ENABLE(ACCELERATED_2D_CANVAS)
return nullptr;
}
- EGLSurface surface = eglCreatePixmapSurface(display, config, pixmap.get(), 0);
+ EGLSurface surface = eglCreatePixmapSurface(display, config, reinterpret_cast<EGLNativePixmapType>(pixmap.get()), 0);
if (surface == EGL_NO_SURFACE) {
eglDestroyContext(display, context);
return nullptr;
# FIXME: Can we use cairo-glesv2 to avoid this conflict?
WEBKIT_OPTION_CONFLICT(ENABLE_ACCELERATED_2D_CANVAS ENABLE_GLES2)
-# FIXME: Should be possible to build with support for both X11 and Wayland.
-WEBKIT_OPTION_CONFLICT(ENABLE_WAYLAND_TARGET ENABLE_X11_TARGET)
-
WEBKIT_OPTION_DEPEND(ENABLE_3D_TRANSFORMS ENABLE_OPENGL)
WEBKIT_OPTION_DEPEND(ENABLE_ACCELERATED_2D_CANVAS ENABLE_OPENGL)
WEBKIT_OPTION_DEPEND(ENABLE_GLES2 ENABLE_OPENGL)