Diff
Modified: trunk/Tools/ChangeLog (123207 => 123208)
--- trunk/Tools/ChangeLog 2012-07-20 13:07:48 UTC (rev 123207)
+++ trunk/Tools/ChangeLog 2012-07-20 13:26:40 UTC (rev 123208)
@@ -1,3 +1,23 @@
+2012-07-20 Zeno Albisser <[email protected]>
+
+ [Qt][WK2] Add configure tests for Xrender and GLX.
+ https://bugs.webkit.org/show_bug.cgi?id=91845
+
+ GraphicsSurface on linux requires Xcomposite, Xrender
+ and GLX. If any of these requirements is not met,
+ we should disable GraphicsSurface.
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * qmake/config.tests/glx/glx.cpp: Added.
+ (main):
+ * qmake/config.tests/glx/glx.pro: Added.
+ * qmake/config.tests/libXrender/libXrender.cpp: Added.
+ (main):
+ * qmake/config.tests/libXrender/libXrender.pro: Added.
+ * qmake/configure.pri:
+ * qmake/mkspecs/features/features.prf:
+
2012-07-20 Kangil Han <[email protected]>
[EFL][WK2][WTR] Implement EventSenderProxy
Added: trunk/Tools/qmake/config.tests/glx/glx.cpp (0 => 123208)
--- trunk/Tools/qmake/config.tests/glx/glx.cpp (rev 0)
+++ trunk/Tools/qmake/config.tests/glx/glx.cpp 2012-07-20 13:26:40 UTC (rev 123208)
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <GL/glx.h>
+
+int main(int, char**)
+{
+ Display* display = XOpenDisplay(0);
+ int items = 0;
+ (void)glXChooseFBConfig(display, DefaultScreen(display), 0, &items);
+ XCloseDisplay(display);
+
+ return 0;
+}
Added: trunk/Tools/qmake/config.tests/glx/glx.pro (0 => 123208)
--- trunk/Tools/qmake/config.tests/glx/glx.pro (rev 0)
+++ trunk/Tools/qmake/config.tests/glx/glx.pro 2012-07-20 13:26:40 UTC (rev 123208)
@@ -0,0 +1,4 @@
+SOURCES = glx.cpp
+OBJECTS_DIR = obj
+LIBS += -lX11 -lGL
+
Added: trunk/Tools/qmake/config.tests/libXrender/libXrender.cpp (0 => 123208)
--- trunk/Tools/qmake/config.tests/libXrender/libXrender.cpp (rev 0)
+++ trunk/Tools/qmake/config.tests/libXrender/libXrender.cpp 2012-07-20 13:26:40 UTC (rev 123208)
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <X11/extensions/Xrender.h>
+
+int main(int, char**)
+{
+ Display* display = XOpenDisplay(0);
+ int eventBasep;
+ int errorBasep;
+ if (!XRenderQueryExtension(display, &eventBasep, &errorBasep))
+ return -1;
+ return 0;
+}
+
Added: trunk/Tools/qmake/config.tests/libXrender/libXrender.pro (0 => 123208)
--- trunk/Tools/qmake/config.tests/libXrender/libXrender.pro (rev 0)
+++ trunk/Tools/qmake/config.tests/libXrender/libXrender.pro 2012-07-20 13:26:40 UTC (rev 123208)
@@ -0,0 +1,3 @@
+SOURCES = libXrender.cpp
+OBJECTS_DIR = obj
+LIBS += -lXrender -lX11
Modified: trunk/Tools/qmake/configure.pri (123207 => 123208)
--- trunk/Tools/qmake/configure.pri 2012-07-20 13:07:48 UTC (rev 123207)
+++ trunk/Tools/qmake/configure.pri 2012-07-20 13:26:40 UTC (rev 123208)
@@ -12,10 +12,12 @@
CONFIG_TESTS = \
fontconfig \
gccdepends \
+ glx \
libpng \
libjpeg \
libwebp \
libXcomposite \
+ libXrender \
libxml2 \
libxslt \
libzlib
Modified: trunk/Tools/qmake/mkspecs/features/features.prf (123207 => 123208)
--- trunk/Tools/qmake/mkspecs/features/features.prf 2012-07-20 13:07:48 UTC (rev 123207)
+++ trunk/Tools/qmake/mkspecs/features/features.prf 2012-07-20 13:26:40 UTC (rev 123208)
@@ -179,12 +179,18 @@
# Xcomposite Support
haveQt(5):linux-*:config_libXcomposite: DEFINES += HAVE_XCOMPOSITE=1
+# Xrender Support
+haveQt(5):linux-*:config_libXrender: DEFINES += HAVE_XRENDER=1
+
+# GLX Support
+haveQt(5):linux-*:config_glx: DEFINES += HAVE_GLX=1
+
# Support for Graphics Surface
!contains(DEFINES, WTF_USE_GRAPHICS_SURFACE=.) {
haveQt(5) {
mac: DEFINES += WTF_USE_GRAPHICS_SURFACE=1
- # On linux we require libXcomposite to enable graphics surface.
- linux-*:contains(DEFINES, HAVE_XCOMPOSITE=1): DEFINES += WTF_USE_GRAPHICS_SURFACE=1
+ # On linux we require GLX, libXcomposite and libXrender to enable graphics surface.
+ linux-*:contains(DEFINES, HAVE_GLX=1):contains(DEFINES, HAVE_XCOMPOSITE=1):contains(DEFINES, HAVE_XRENDER=1): DEFINES += WTF_USE_GRAPHICS_SURFACE=1
}
}