<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[202619] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/202619">202619</a></dd>
<dt>Author</dt> <dd>clopez@igalia.com</dd>
<dt>Date</dt> <dd>2016-06-29 03:31:40 -0700 (Wed, 29 Jun 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>[GTK][Wayland] Implement support for running the layout tests under a (virtualized) Wayland environment.
https://bugs.webkit.org/show_bug.cgi?id=156716
Reviewed by Carlos Garcia Campos and Michael Catanzaro.
Tools:
* Scripts/webkitpy/layout_tests/run_webkit_tests.py: Allow to run the layout tests on Wayland by passing --wayland
(parse_args):
* Scripts/webkitpy/port/gtk.py:
(GtkPort.__init__):
(GtkPort._driver_class):
(GtkPort.setup_environ_for_server): Set the softgl renderer (now with EGL support) for the wayland tests.
(GtkPort._search_paths): When running inside the wayland environment, use ${port}-wayland as an additional
platform directory for storing the wayland specific layout test results and expectations for ${port}.
For example, the file LayoutTests/platform/gtk-wayland/TestExpectations will be used as the most specific
test expectations file on the GTK port when running the tests with the --wayland command line switch.
Baseline search path: gtk-wayland -> gtk -> wk2 -> generic.
* Scripts/webkitpy/port/westondriver.py: Run the weston display server inside Xvfb.
(WestonDriver.check_driver):
(WestonDriver.__init__):
(WestonDriver._start):
* Scripts/webkitpy/port/westondriver_unittest.py: Fix unittests for the new Weston inside Xvfb driver.
(WestonXvfbDriverDisplayTest):
(WestonXvfbDriverDisplayTest.__init__):
(WestonXvfbDriverDisplayTest._xvfb_run):
(WestonDriverTest.make_driver):
(WestonDriverTest.test_start):
* gtk/install-dependencies: Add the new dependencies that are required for either building weston,
or to satisfy the pkg-config check of the new added modules in JHBuild.
* gtk/jhbuild.modules: For building weston new enough on Debian Jessie we also need to build wayland
and libinput. Declare a pkg-config entry on all this modules to avoid building them if the ones
provided by the system are already new enough.
Switch the Mesa software rasterizer from a Xlib based GLX renderer to a DRI based EGL/GLX one.
It was the only way to get the software EGL rasterizer working without depending on user drivers.
Due to this the Mesa build now depends on a modern enough libdrm, so we also use JHBuild pkg-config
feature to avoid building libdrm when the one provided by the system is new enough.
* gtk/jhbuildrc:
* gtk/patches/xserver-search-for-DRI-drivers-at-LIBGL_DRIVERS_PATH-environ.patch: Added.
Xorg had no support for searching the DRI drivers on a custom path at runtime.
This patch implements support for that reusing the same variable that we use with Mesa to set the
custom path for the DRI drivers path.
LayoutTests:
* platform/gtk-wayland/TestExpectations: Added. Add initial Wayland specific test expectations.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsScriptswebkitpylayout_testsrun_webkit_testspy">trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py</a></li>
<li><a href="#trunkToolsScriptswebkitpyportgtkpy">trunk/Tools/Scripts/webkitpy/port/gtk.py</a></li>
<li><a href="#trunkToolsScriptswebkitpyportwestondriverpy">trunk/Tools/Scripts/webkitpy/port/westondriver.py</a></li>
<li><a href="#trunkToolsScriptswebkitpyportwestondriver_unittestpy">trunk/Tools/Scripts/webkitpy/port/westondriver_unittest.py</a></li>
<li><a href="#trunkToolsgtkinstalldependencies">trunk/Tools/gtk/install-dependencies</a></li>
<li><a href="#trunkToolsgtkjhbuildmodules">trunk/Tools/gtk/jhbuild.modules</a></li>
<li><a href="#trunkToolsgtkjhbuildrc">trunk/Tools/gtk/jhbuildrc</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li>trunk/LayoutTests/platform/gtk-wayland/</li>
<li><a href="#trunkLayoutTestsplatformgtkwaylandTestExpectations">trunk/LayoutTests/platform/gtk-wayland/TestExpectations</a></li>
<li><a href="#trunkToolsgtkpatchesxserversearchforDRIdriversatLIBGL_DRIVERS_PATHenvironpatch">trunk/Tools/gtk/patches/xserver-search-for-DRI-drivers-at-LIBGL_DRIVERS_PATH-environ.patch</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (202618 => 202619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-06-29 10:28:27 UTC (rev 202618)
+++ trunk/LayoutTests/ChangeLog        2016-06-29 10:31:40 UTC (rev 202619)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2016-06-29 Carlos Alberto Lopez Perez <clopez@igalia.com>
+
+ [GTK][Wayland] Implement support for running the layout tests under a (virtualized) Wayland environment.
+ https://bugs.webkit.org/show_bug.cgi?id=156716
+
+ Reviewed by Carlos Garcia Campos and Michael Catanzaro.
+
+ * platform/gtk-wayland/TestExpectations: Added. Add initial Wayland specific test expectations.
+
</ins><span class="cx"> 2016-06-29 David Kilzer <ddkilzer@apple.com>
</span><span class="cx">
</span><span class="cx"> Throw exceptions for invalid number of channels for ConvolverNode
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkwaylandTestExpectations"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/gtk-wayland/TestExpectations (0 => 202619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk-wayland/TestExpectations         (rev 0)
+++ trunk/LayoutTests/platform/gtk-wayland/TestExpectations        2016-06-29 10:31:40 UTC (rev 202619)
</span><span class="lines">@@ -0,0 +1,81 @@
</span><ins>+#////////////////////////////////////////////////////////////////////////////////////////
+# This file contains the specific expectations that only fail or only pass on Wayland.
+#
+# This file overrides the generic GTK+ one when running the layout tests with --wayland
+# Default baseline search path with --wayland: gtk-wayland -> gtk -> wk2 -> generic.
+#////////////////////////////////////////////////////////////////////////////////////////
+
+#////////////////////////////////////////////////////////////////////////////////////////
+# Expected failures
+#////////////////////////////////////////////////////////////////////////////////////////
+
+webkit.org/b/156717 transforms/3d/point-mapping/3d-point-mapping-preserve-3d.html [ Failure ]
+webkit.org/b/156717 transforms/3d/point-mapping/3d-point-mapping-overlapping.html [ Failure ]
+webkit.org/b/156717 transforms/3d/point-mapping/3d-point-mapping-origins.html [ Failure ]
+webkit.org/b/156717 transforms/3d/point-mapping/3d-point-mapping.html [ Failure ]
+webkit.org/b/156717 transforms/3d/point-mapping/3d-point-mapping-deep.html [ Failure ]
+webkit.org/b/156717 transforms/3d/point-mapping/3d-point-mapping-coplanar.html [ Failure ]
+webkit.org/b/156717 transforms/3d/point-mapping/3d-point-mapping-3.html [ Failure ]
+webkit.org/b/156717 transforms/3d/point-mapping/3d-point-mapping-2.html [ Failure ]
+webkit.org/b/156717 transforms/3d/hit-testing/rotated-hit-test.html [ Failure ]
+webkit.org/b/156717 transforms/3d/hit-testing/rotated-hit-test2.html [ Failure ]
+webkit.org/b/156717 transforms/3d/hit-testing/perspective-clipped.html [ Failure ]
+webkit.org/b/156717 transforms/3d/hit-testing/overlapping-layers-hit-test.html [ Failure ]
+webkit.org/b/156717 transforms/3d/hit-testing/backface-no-transform-hit-test.html [ Failure ]
+webkit.org/b/156717 transforms/3d/hit-testing/backface-hit-test.html [ Failure ]
+webkit.org/b/156717 imported/blink/css3/blending/mix-blend-mode-multiply.html [ ImageOnlyFailure ]
+webkit.org/b/156717 imported/blink/css3/blending/mix-blend-mode-has-ancestor-clipping-layer.html [ ImageOnlyFailure ]
+webkit.org/b/156717 fast/repaint/animation-after-layer-scroll.html [ Failure ]
+webkit.org/b/156717 fast/regions/overflow/overflow-3dtransformed-region.html [ Failure ]
+webkit.org/b/156717 editing/pasteboard/paste-global-selection.html [ Failure ]
+webkit.org/b/156717 editing/pasteboard/gtk/middle-click-onpaste.html [ Failure ]
+
+
+#////////////////////////////////////////////////////////////////////////////////////////
+# End of Expected failures
+#////////////////////////////////////////////////////////////////////////////////////////
+
+#////////////////////////////////////////////////////////////////////////////////////////
+# Crashing tests
+#////////////////////////////////////////////////////////////////////////////////////////
+
+webkit.org/b/156717 media/crash-closing-page-with-media-as-plugin-fallback.html [ Crash ]
+webkit.org/b/156717 loader/navigation-policy/should-open-external-urls/user-gesture-window-open-without-flag.html [ Crash ]
+webkit.org/b/156717 loader/navigation-policy/should-open-external-urls/user-gesture-window-open-without-flag-from-subframe.html [ Crash ]
+webkit.org/b/156717 loader/navigation-policy/should-open-external-urls/user-gesture-window-open-with-flag.html [ Crash ]
+webkit.org/b/156717 loader/navigation-policy/should-open-external-urls/user-gesture-window-open-with-flag-from-subframe.html [ Crash ]
+webkit.org/b/156717 loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-without-flag.html [ Crash ]
+webkit.org/b/156717 loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-without-flag-from-subframe.html [ Crash ]
+webkit.org/b/156717 loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-with-flag.html [ Crash ]
+webkit.org/b/156717 loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-with-flag-from-subframe.html [ Crash ]
+webkit.org/b/156717 http/tests/security/referrer-policy-redirect-link.html [ Crash ]
+webkit.org/b/156717 http/tests/security/isolatedWorld/userGestureEvents.html [ Crash ]
+webkit.org/b/156717 http/tests/navigation/no-referrer-target-blank.html [ Crash ]
+webkit.org/b/156717 http/tests/navigation/no-referrer-reset.html [ Crash ]
+webkit.org/b/156717 fast/history/window-open.html [ Crash ]
+webkit.org/b/156717 fast/history/history_reload.html [ Crash ]
+webkit.org/b/156717 fast/forms/select-type-ahead-non-latin.html [ Crash ]
+webkit.org/b/156717 fast/forms/listbox-typeahead-greek.html [ Crash ]
+webkit.org/b/156717 fast/forms/listbox-typeahead-cyrillic.html [ Crash ]
+webkit.org/b/156717 fast/events/popup-blocking-timers1.html [ Crash ]
+webkit.org/b/156717 fast/events/popup-blocked-from-fake-user-gesture.html [ Crash ]
+webkit.org/b/156717 fast/events/popup-allowed-from-gesture-initiated-event.html [ Crash ]
+webkit.org/b/156717 fast/events/open-window-from-another-frame.html [ Crash ]
+webkit.org/b/156717 fast/events/keydown-numpad-keys.html [ Crash ]
+webkit.org/b/156717 editing/spelling/spelling-changed-text.html [ Crash ]
+
+
+#////////////////////////////////////////////////////////////////////////////////////////
+# End of Crashing tests
+#////////////////////////////////////////////////////////////////////////////////////////
+
+#////////////////////////////////////////////////////////////////////////////////////////
+# Tests timing out
+#////////////////////////////////////////////////////////////////////////////////////////
+
+webkit.org/b/156717 fast/images/animated-gif-iframe-webkit-transform.html [ Timeout ]
+webkit.org/b/156717 plugins/mouse-events.html [ Timeout ]
+
+#////////////////////////////////////////////////////////////////////////////////////////
+# End of Tests timing out
+#////////////////////////////////////////////////////////////////////////////////////////
</ins></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (202618 => 202619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2016-06-29 10:28:27 UTC (rev 202618)
+++ trunk/Tools/ChangeLog        2016-06-29 10:31:40 UTC (rev 202619)
</span><span class="lines">@@ -1,3 +1,46 @@
</span><ins>+2016-06-29 Carlos Alberto Lopez Perez <clopez@igalia.com>
+
+ [GTK][Wayland] Implement support for running the layout tests under a (virtualized) Wayland environment.
+ https://bugs.webkit.org/show_bug.cgi?id=156716
+
+ Reviewed by Carlos Garcia Campos and Michael Catanzaro.
+
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py: Allow to run the layout tests on Wayland by passing --wayland
+ (parse_args):
+ * Scripts/webkitpy/port/gtk.py:
+ (GtkPort.__init__):
+ (GtkPort._driver_class):
+ (GtkPort.setup_environ_for_server): Set the softgl renderer (now with EGL support) for the wayland tests.
+ (GtkPort._search_paths): When running inside the wayland environment, use ${port}-wayland as an additional
+ platform directory for storing the wayland specific layout test results and expectations for ${port}.
+ For example, the file LayoutTests/platform/gtk-wayland/TestExpectations will be used as the most specific
+ test expectations file on the GTK port when running the tests with the --wayland command line switch.
+ Baseline search path: gtk-wayland -> gtk -> wk2 -> generic.
+ * Scripts/webkitpy/port/westondriver.py: Run the weston display server inside Xvfb.
+ (WestonDriver.check_driver):
+ (WestonDriver.__init__):
+ (WestonDriver._start):
+ * Scripts/webkitpy/port/westondriver_unittest.py: Fix unittests for the new Weston inside Xvfb driver.
+ (WestonXvfbDriverDisplayTest):
+ (WestonXvfbDriverDisplayTest.__init__):
+ (WestonXvfbDriverDisplayTest._xvfb_run):
+ (WestonDriverTest.make_driver):
+ (WestonDriverTest.test_start):
+ * gtk/install-dependencies: Add the new dependencies that are required for either building weston,
+ or to satisfy the pkg-config check of the new added modules in JHBuild.
+ * gtk/jhbuild.modules: For building weston new enough on Debian Jessie we also need to build wayland
+ and libinput. Declare a pkg-config entry on all this modules to avoid building them if the ones
+ provided by the system are already new enough.
+ Switch the Mesa software rasterizer from a Xlib based GLX renderer to a DRI based EGL/GLX one.
+ It was the only way to get the software EGL rasterizer working without depending on user drivers.
+ Due to this the Mesa build now depends on a modern enough libdrm, so we also use JHBuild pkg-config
+ feature to avoid building libdrm when the one provided by the system is new enough.
+ * gtk/jhbuildrc:
+ * gtk/patches/xserver-search-for-DRI-drivers-at-LIBGL_DRIVERS_PATH-environ.patch: Added.
+ Xorg had no support for searching the DRI drivers on a custom path at runtime.
+ This patch implements support for that reusing the same variable that we use with Mesa to set the
+ custom path for the DRI drivers path.
+
</ins><span class="cx"> 2016-06-29 Alejandro G. Castro <alex@igalia.com>
</span><span class="cx">
</span><span class="cx"> [WebRTC][OWR] Bump gst-plugins-openwebrtc jhbuild version to get scream fixes
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpylayout_testsrun_webkit_testspy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py (202618 => 202619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py        2016-06-29 10:28:27 UTC (rev 202618)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py        2016-06-29 10:31:40 UTC (rev 202619)
</span><span class="lines">@@ -282,6 +282,8 @@
</span><span class="cx"> optparse.make_option("--profiler", action="store",
</span><span class="cx"> help="Output per-test profile information, using the specified profiler."),
</span><span class="cx"> optparse.make_option("--no-timeout", action="store_true", default=False, help="Disable test timeouts"),
</span><ins>+ optparse.make_option("--wayland", action="store_true", default=False,
+ help="Run the layout tests inside a (virtualized) weston compositor (GTK only)."),
</ins><span class="cx"> ]))
</span><span class="cx">
</span><span class="cx"> option_group_definitions.append(("iOS Simulator Options", [
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpyportgtkpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/port/gtk.py (202618 => 202619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/port/gtk.py        2016-06-29 10:28:27 UTC (rev 202618)
+++ trunk/Tools/Scripts/webkitpy/port/gtk.py        2016-06-29 10:31:40 UTC (rev 202619)
</span><span class="lines">@@ -52,6 +52,7 @@
</span><span class="cx"> def __init__(self, *args, **kwargs):
</span><span class="cx"> super(GtkPort, self).__init__(*args, **kwargs)
</span><span class="cx"> self._pulseaudio_sanitizer = PulseAudioSanitizer()
</span><ins>+ self._wayland = self.get_option("wayland")
</ins><span class="cx">
</span><span class="cx"> if self.get_option("leaks"):
</span><span class="cx"> self._leakdetector = LeakDetectorValgrind(self._executive, self._filesystem, self.results_directory())
</span><span class="lines">@@ -76,7 +77,7 @@
</span><span class="cx">
</span><span class="cx"> @memoized
</span><span class="cx"> def _driver_class(self):
</span><del>- if os.environ.get("WAYLAND_DISPLAY"):
</del><ins>+ if self._wayland:
</ins><span class="cx"> return WestonDriver
</span><span class="cx"> if os.environ.get("USE_NATIVE_XDISPLAY"):
</span><span class="cx"> return XorgDriver
</span><span class="lines">@@ -118,11 +119,15 @@
</span><span class="cx"> environment['TEST_RUNNER_TEST_PLUGIN_PATH'] = self._build_path('lib', 'plugins')
</span><span class="cx"> environment['OWR_USE_TEST_SOURCES'] = '1'
</span><span class="cx"> self._copy_value_from_environ_if_set(environment, 'WEBKIT_OUTPUTDIR')
</span><del>- if self._driver_class() == XvfbDriver and self._should_use_jhbuild():
</del><ins>+ # Configure the software libgl renderer if jhbuild ready and we test inside a virtualized window system
+ if self._driver_class() in [XvfbDriver, WestonDriver] and self._should_use_jhbuild():
</ins><span class="cx"> llvmpipe_libgl_path = self.host.executive.run_command(self._jhbuild_wrapper + ['printenv', 'LLVMPIPE_LIBGL_PATH'],
</span><span class="cx"> error_handler=self.host.executive.ignore_error).strip()
</span><del>- if os.path.exists(os.path.join(llvmpipe_libgl_path, "libGL.so")):
</del><ins>+ dri_libgl_path = os.path.join(llvmpipe_libgl_path, "dri")
+ if os.path.exists(os.path.join(llvmpipe_libgl_path, "libGL.so")) and os.path.exists(os.path.join(dri_libgl_path, "swrast_dri.so")):
</ins><span class="cx"> # Force the Gallium llvmpipe software rasterizer
</span><ins>+ environment['LIBGL_ALWAYS_SOFTWARE'] = "1"
+ environment['LIBGL_DRIVERS_PATH'] = dri_libgl_path
</ins><span class="cx"> environment['LD_LIBRARY_PATH'] = llvmpipe_libgl_path
</span><span class="cx"> if os.environ.get('LD_LIBRARY_PATH'):
</span><span class="cx"> environment['LD_LIBRARY_PATH'] += ':%s' % os.environ.get('LD_LIBRARY_PATH')
</span><span class="lines">@@ -180,6 +185,8 @@
</span><span class="cx">
</span><span class="cx"> def _search_paths(self):
</span><span class="cx"> search_paths = []
</span><ins>+ if self._wayland:
+ search_paths.append(self.port_name + "-wayland")
</ins><span class="cx"> search_paths.append(self.port_name)
</span><span class="cx"> search_paths.append('wk2')
</span><span class="cx"> search_paths.extend(self.get_option("additional_platform_directory", []))
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpyportwestondriverpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/port/westondriver.py (202618 => 202619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/port/westondriver.py        2016-06-29 10:28:27 UTC (rev 202618)
+++ trunk/Tools/Scripts/webkitpy/port/westondriver.py        2016-06-29 10:31:40 UTC (rev 202619)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx">
</span><span class="cx"> from webkitpy.port.server_process import ServerProcess
</span><span class="cx"> from webkitpy.port.driver import Driver
</span><ins>+from webkitpy.port.xvfbdriver import XvfbDriver
</ins><span class="cx">
</span><span class="cx"> _log = logging.getLogger(__name__)
</span><span class="cx">
</span><span class="lines">@@ -40,7 +41,10 @@
</span><span class="cx"> class WestonDriver(Driver):
</span><span class="cx"> @staticmethod
</span><span class="cx"> def check_driver(port):
</span><del>- weston_found = port.host.executive.run_command(['which', 'weston'], return_exit_code=True) is 0
</del><ins>+ weston_findcmd = ['which', 'weston']
+ if port._should_use_jhbuild():
+ weston_findcmd = port._jhbuild_wrapper + weston_findcmd
+ weston_found = port.host.executive.run_command(weston_findcmd, return_exit_code=True) is 0
</ins><span class="cx"> if not weston_found:
</span><span class="cx"> _log.error("No weston found. Cannot run layout tests.")
</span><span class="cx"> return weston_found
</span><span class="lines">@@ -48,22 +52,28 @@
</span><span class="cx"> def __init__(self, *args, **kwargs):
</span><span class="cx"> Driver.__init__(self, *args, **kwargs)
</span><span class="cx"> self._startup_delay_secs = 1.0
</span><ins>+ self._xvfbdriver = XvfbDriver(*args, **kwargs)
</ins><span class="cx">
</span><span class="cx"> def _start(self, pixel_tests, per_test_args):
</span><span class="cx"> self.stop()
</span><span class="cx">
</span><span class="cx"> driver_name = self._port.driver_name()
</span><ins>+
</ins><span class="cx"> self._driver_directory = self._port.host.filesystem.mkdtemp(prefix='%s-' % driver_name)
</span><span class="cx">
</span><ins>+ driver_environment = self._port.setup_environ_for_server(driver_name)
+ driver_environment['DISPLAY'] = ":%d" % self._xvfbdriver._xvfb_run(driver_environment)
+
</ins><span class="cx"> weston_socket = 'WKTesting-weston-%032x' % random.getrandbits(128)
</span><del>- weston_command = ['weston', '--socket=%s' % weston_socket, '--width=800', '--height=600']
</del><ins>+ weston_command = ['weston', '--socket=%s' % weston_socket, '--width=1024', '--height=768', '--use-pixman']
+ if self._port._should_use_jhbuild():
+ weston_command = self._port._jhbuild_wrapper + weston_command
</ins><span class="cx"> with open(os.devnull, 'w') as devnull:
</span><del>- self._weston_process = self._port.host.executive.popen(weston_command, stderr=devnull)
</del><ins>+ self._weston_process = self._port.host.executive.popen(weston_command, stderr=devnull, env=driver_environment)
</ins><span class="cx">
</span><span class="cx"> # Give Weston a bit of time to set itself up.
</span><span class="cx"> time.sleep(self._startup_delay_secs)
</span><span class="cx">
</span><del>- driver_environment = self._port.setup_environ_for_server(driver_name)
</del><span class="cx"> driver_environment['LOCAL_RESOURCE_ROOT'] = self._port.layout_tests_dir()
</span><span class="cx">
</span><span class="cx"> # Currently on WebKit2, there is no API for setting the application cache directory.
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpyportwestondriver_unittestpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/port/westondriver_unittest.py (202618 => 202619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/port/westondriver_unittest.py        2016-06-29 10:28:27 UTC (rev 202618)
+++ trunk/Tools/Scripts/webkitpy/port/westondriver_unittest.py        2016-06-29 10:31:40 UTC (rev 202619)
</span><span class="lines">@@ -41,6 +41,14 @@
</span><span class="cx"> _log = logging.getLogger(__name__)
</span><span class="cx">
</span><span class="cx">
</span><ins>+class WestonXvfbDriverDisplayTest():
+ def __init__(self, expected_xvfbdisplay):
+ self._expected_xvfbdisplay = expected_xvfbdisplay
+
+ def _xvfb_run(self, environment):
+ return self._expected_xvfbdisplay
+
+
</ins><span class="cx"> class WestonDriverTest(unittest.TestCase):
</span><span class="cx"> def make_driver(self, filesystem=None):
</span><span class="cx"> port = Port(MockSystemHost(log_executive=True, filesystem=filesystem), 'westondrivertestport', options=MockOptions(configuration='Release'))
</span><span class="lines">@@ -49,6 +57,9 @@
</span><span class="cx">
</span><span class="cx"> driver = WestonDriver(port, worker_number=0, pixel_tests=True)
</span><span class="cx"> driver._startup_delay_secs = 0
</span><ins>+ driver._expected_xvfbdisplay = 23
+ driver._xvfbdriver = WestonXvfbDriverDisplayTest(driver._expected_xvfbdisplay)
+ driver._environment = port.setup_environ_for_server(port.driver_name())
</ins><span class="cx"> return driver
</span><span class="cx">
</span><span class="cx"> def test_start(self):
</span><span class="lines">@@ -59,8 +70,10 @@
</span><span class="cx"> driver.start(pixel_tests=True, per_test_args=[])
</span><span class="cx"> _, _, logs = output_capture.restore_output()
</span><span class="cx">
</span><del>- self.assertTrue(re.match(r"MOCK popen: \['weston', '--socket=WKTesting-weston-[0-9a-f]{32}', '--width=800', '--height=600'\]\n", logs), None)
</del><ins>+ self.assertTrue(re.match(r"MOCK popen: \['weston', '--socket=WKTesting-weston-[0-9a-f]{32}', '--width=1024', '--height=768', '--use-pixman'\], env=.*\n", logs), None)
</ins><span class="cx"> self.assertTrue(re.match(r"WKTesting-weston-[0-9a-f]{32}", driver._server_process.env['WAYLAND_DISPLAY']))
</span><ins>+ self.assertFalse('DISPLAY' in driver._server_process.env)
+ self.assertTrue("'DISPLAY': ':%s'" % driver._expected_xvfbdisplay in logs)
</ins><span class="cx"> self.assertEqual(driver._server_process.env['GDK_BACKEND'], 'wayland')
</span><span class="cx"> self.assertTrue(driver._server_process.started)
</span><span class="cx">
</span></span></pre></div>
<a id="trunkToolsgtkinstalldependencies"></a>
<div class="modfile"><h4>Modified: trunk/Tools/gtk/install-dependencies (202618 => 202619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/gtk/install-dependencies        2016-06-29 10:28:27 UTC (rev 202618)
+++ trunk/Tools/gtk/install-dependencies        2016-06-29 10:31:40 UTC (rev 202619)
</span><span class="lines">@@ -143,6 +143,7 @@
</span><span class="cx"> ruby \
</span><span class="cx"> ruby-json \
</span><span class="cx"> ruby-highline \
</span><ins>+ weston \
</ins><span class="cx"> xvfb"
</span><span class="cx">
</span><span class="cx"> # These are dependencies necessary for building the jhbuild.
</span><span class="lines">@@ -151,11 +152,17 @@
</span><span class="cx"> gobject-introspection \
</span><span class="cx"> icon-naming-utils \
</span><span class="cx"> libcroco3-dev \
</span><ins>+ libdrm-dev \
</ins><span class="cx"> libegl1-mesa-dev \
</span><span class="cx"> libepoxy-dev \
</span><ins>+ libevdev-dev \
+ libexpat1-dev \
+ libgbm-dev \
</ins><span class="cx"> libgcrypt11-dev \
</span><span class="cx"> libgpg-error-dev \
</span><span class="cx"> libjson-glib-dev \
</span><ins>+ libinput-dev \
+ libmtdev-dev \
</ins><span class="cx"> liborc-0.4-dev \
</span><span class="cx"> libp11-kit-dev \
</span><span class="cx"> libpciaccess-dev \
</span><span class="lines">@@ -162,10 +169,12 @@
</span><span class="cx"> libssl-dev \
</span><span class="cx"> libtiff5-dev \
</span><span class="cx"> libv4l-dev \
</span><ins>+ libxcb-composite0-dev \
</ins><span class="cx"> libxcb-xfixes0-dev \
</span><span class="cx"> libxfont-dev \
</span><span class="cx"> libxkbfile-dev \
</span><span class="cx"> libtool-bin \
</span><ins>+ libudev-dev \
</ins><span class="cx"> llvm \
</span><span class="cx"> llvm-dev \
</span><span class="cx"> python-dev \
</span><span class="lines">@@ -278,25 +287,32 @@
</span><span class="cx"> python-gobject \
</span><span class="cx"> ruby \
</span><span class="cx"> ruby-highline \
</span><ins>+ weston \
</ins><span class="cx"> xorg-server-xvfb"
</span><span class="cx">
</span><span class="cx"> # These are dependencies necessary for building the jhbuild.
</span><span class="cx"> # Note: Could not find libegl-mesa
</span><span class="cx"> packages="$packages \
</span><ins>+ expat \
</ins><span class="cx"> git \
</span><span class="cx"> gobject-introspection \
</span><span class="cx"> icon-naming-utils \
</span><span class="cx"> libcroco \
</span><ins>+ libdrm \
</ins><span class="cx"> libepoxy \
</span><ins>+ libevdev \
</ins><span class="cx"> libgcrypt \
</span><span class="cx"> libgpg-error \
</span><ins>+ libinput \
</ins><span class="cx"> p11-kit \
</span><span class="cx"> libpciaccess \
</span><span class="cx"> libtiff \
</span><span class="cx"> libxfixes \
</span><span class="cx"> libxfont \
</span><ins>+ libxcb \
</ins><span class="cx"> libxkbfile \
</span><span class="cx"> llvm \
</span><ins>+ mtdev \
</ins><span class="cx"> python2 \
</span><span class="cx"> python2-lxml \
</span><span class="cx"> ragel \
</span><span class="lines">@@ -396,10 +412,12 @@
</span><span class="cx"> ruby \
</span><span class="cx"> rubygem-json \
</span><span class="cx"> rubygem-highline \
</span><ins>+ weston-devel \
</ins><span class="cx"> xorg-x11-server-Xvfb"
</span><span class="cx">
</span><span class="cx"> # These are dependencies necessary for building the jhbuild.
</span><span class="cx"> packages="$packages \
</span><ins>+ expat-devel \
</ins><span class="cx"> docbook-utils \
</span><span class="cx"> docbook-utils-pdf \
</span><span class="cx"> git \
</span><span class="lines">@@ -408,15 +426,21 @@
</span><span class="cx"> itstool \
</span><span class="cx"> libXfont-devel \
</span><span class="cx"> libcroco-devel \
</span><ins>+ libdrm-devel \
</ins><span class="cx"> libepoxy-devel \
</span><ins>+ libevdev-devel
</ins><span class="cx"> libgcrypt-devel \
</span><span class="cx"> libgpg-error-devel \
</span><ins>+ libinput-devel \
</ins><span class="cx"> libp11-devel \
</span><span class="cx"> libpciaccess-devel \
</span><span class="cx"> libtiff-devel \
</span><ins>+ libxcb-devel \
</ins><span class="cx"> libxkbfile-devel \
</span><span class="cx"> mesa-libEGL-devel \
</span><ins>+ mtdev-devel \
</ins><span class="cx"> ragel \
</span><ins>+ systemd-devel \
</ins><span class="cx"> xorg-x11-font-utils \
</span><span class="cx"> xorg-x11-proto-devel \
</span><span class="cx"> xorg-x11-util-macros \
</span></span></pre></div>
<a id="trunkToolsgtkjhbuildmodules"></a>
<div class="modfile"><h4>Modified: trunk/Tools/gtk/jhbuild.modules (202618 => 202619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/gtk/jhbuild.modules        2016-06-29 10:28:27 UTC (rev 202618)
+++ trunk/Tools/gtk/jhbuild.modules        2016-06-29 10:31:40 UTC (rev 202619)
</span><span class="lines">@@ -37,6 +37,7 @@
</span><span class="cx"> <dep package="mesa"/>
</span><span class="cx"> <dep package="at-spi2-core"/>
</span><span class="cx"> <dep package="at-spi2-atk"/>
</span><ins>+ <dep package="weston"/>
</ins><span class="cx"> </if>
</span><span class="cx"> <if condition-set="macos">
</span><span class="cx"> <dep package="gsettings-desktop-schemas"/>
</span><span class="lines">@@ -67,8 +68,12 @@
</span><span class="cx"> href="http://download.savannah.gnu.org/releases/"/>
</span><span class="cx"> <repository type="git" name="freedesktop-git"
</span><span class="cx"> href="http://anongit.freedesktop.org/git"/>
</span><ins>+ <repository type="tarball" name="dri.freedesktop.org"
+ href="http://dri.freedesktop.org"/>
</ins><span class="cx"> <repository type="tarball" name="people.freedesktop.org"
</span><span class="cx"> href="http://people.freedesktop.org"/>
</span><ins>+ <repository type="tarball" name="wayland.freedesktop.org"
+ href="http://wayland.freedesktop.org"/>
</ins><span class="cx"> <repository type="tarball" name="llvm.org"
</span><span class="cx"> href="http://llvm.org"/>
</span><span class="cx"> <repository type="tarball" name="webkitgtk-jhbuild-mirror"
</span><span class="lines">@@ -182,6 +187,7 @@
</span><span class="cx"> <dep package="atk"/>
</span><span class="cx"> <if condition-set="linux">
</span><span class="cx"> <dep package="at-spi2-atk"/>
</span><ins>+ <dep package="wayland"/>
</ins><span class="cx"> </if>
</span><span class="cx"> <dep package="gdk-pixbuf"/>
</span><span class="cx"> <dep package="pango"/>
</span><span class="lines">@@ -414,9 +420,40 @@
</span><span class="cx"> hash="sha256:abb6e1cc9213a9915a121f48576ff6739a0b8cdb3d32796f9a7743c9a6efc871"
</span><span class="cx"> md5sum="80d140f631d862b76dc67ae983151c77">
</span><span class="cx"> <patch file="xserver-remove-bogus-dependencies.patch" strip="1"/>
</span><ins>+ <patch file="xserver-search-for-DRI-drivers-at-LIBGL_DRIVERS_PATH-environ.patch" strip="1"/>
</ins><span class="cx"> </branch>
</span><span class="cx"> </autotools>
</span><span class="cx">
</span><ins>+ <autotools id="wayland" autogenargs="--disable-documentation">
+ <pkg-config>wayland-server.pc</pkg-config>
+ <dependencies>
+ <dep package="libffi"/>
+ </dependencies>
+ <branch module="releases/wayland-1.8.1.tar.xz"
+ version="1.8.1"
+ repo="wayland.freedesktop.org"
+ hash="sha256:f17c938d1c24fd0a10f650a623a2775d329db3168b5732e498b08388ec776fc8"
+ md5sum="6e877877c3e04cfb865cfcd0733c9ab1">
+ </branch>
+ </autotools>
+
+ <autotools id="weston" autogenargs="--enable-x11-compositor --disable-rpi-compositor --disable-fbdev-compositor --disable-setuid-install --disable-ivi-shell --disable-weston-launch --with-cairo=gl">
+ <pkg-config>weston.pc</pkg-config>
+ <dependencies>
+ <dep package="wayland"/>
+ <dep package="libdrm"/>
+ <dep package="xserver"/>
+ <dep package="cairo"/>
+ <dep package="libinput"/>
+ </dependencies>
+ <branch module="releases/weston-1.8.0.tar.xz"
+ version="1.8.0"
+ repo="wayland.freedesktop.org"
+ hash="sha256:8963e69f328e815cec42c58046c4af721476c7541bb7d9edc71740fada5ad312"
+ md5sum="24cb8a7ed0535b4fc3642643988dab36">
+ </branch>
+ </autotools>
+
</ins><span class="cx"> <autotools id="gtk-doc" autogen-sh="configure">
</span><span class="cx"> <if condition-set="macos">
</span><span class="cx"> <autogenargs value="--with-xml-catalog=/usr/local/etc/xml/catalog"/>
</span><span class="lines">@@ -429,7 +466,16 @@
</span><span class="cx"> hash="sha256:3e6ecf134dbf92a74c24d79848fea3a48e59ab95408a38c6405905d95a293011"/>
</span><span class="cx"> </autotools>
</span><span class="cx">
</span><del>- <autotools id="mesa" autogenargs="--enable-xlib-glx --disable-dri --disable-egl --with-gallium-drivers=swrast" skip-install="true">
</del><ins>+ <autotools id="libdrm" autogen-sh="configure">
+ <pkg-config>libdrm.pc</pkg-config>
+ <branch module="/libdrm/libdrm-2.4.65.tar.bz2" version="2.4.65"
+ repo="dri.freedesktop.org"
+ hash="sha256:71960ac8bde7d710992b1bc8879935e8300a870c36bd06f22412d0447e3d96c4"/>
+ </autotools>
+
+ <autotools id="mesa"
+ autogen-template="%(srcdir)s/%(autogen-sh)s --prefix %(prefix)s/softGL %(autogenargs)s"
+ autogenargs="--disable-dri3 --enable-dri --enable-glx --enable-egl --with-egl-platforms=x11,wayland --with-dri-drivers=swrast --with-gallium-drivers=swrast">
</ins><span class="cx"> <!--- WARNING: At jhbuildrc, when we define the path to the Gallium llvmpipe software rasterizer (needed by XvfbDriver),
</span><span class="cx"> we assume that the directory is named "Mesa". So, don't change the checkoutdir name even if you update the version. -->
</span><span class="cx"> <branch module="/~brianp/mesa/11.0.6/mesa-11.0.6.tar.xz" version="11.0.6"
</span><span class="lines">@@ -439,6 +485,8 @@
</span><span class="cx"> </branch>
</span><span class="cx"> <dependencies>
</span><span class="cx"> <dep package="llvm"/>
</span><ins>+ <dep package="libdrm"/>
+ <dep package="wayland"/>
</ins><span class="cx"> </dependencies>
</span><span class="cx"> </autotools>
</span><span class="cx">
</span><span class="lines">@@ -525,4 +573,16 @@
</span><span class="cx"> </branch>
</span><span class="cx"> </autotools>
</span><span class="cx">
</span><ins>+ <!-- libinput is only included because the version of libinput shipped with Debian Jessie
+ os too old for building Weston 1.8. This may be removed after Debian Strech is released -->
+ <autotools id="libinput" autogen-sh="configure" autogenargs="--disable-libwacom --disable-tests --disable-documentation">
+ <pkg-config>libinput.pc</pkg-config>
+ <branch module="software/libinput/libinput-1.2.4.tar.xz"
+ version="1.2.4"
+ repo="freedesktop.org"
+ hash="sha256:aee3650ad2a864ab9a10e7e63df543cc2b475f6bf3974751037a2df325dabbb1"
+ md5sum="1cbaa34f04a336f2703906d564e0a37a">
+ </branch>
+ </autotools>
+
</ins><span class="cx"> </moduleset>
</span></span></pre></div>
<a id="trunkToolsgtkjhbuildrc"></a>
<div class="modfile"><h4>Modified: trunk/Tools/gtk/jhbuildrc (202618 => 202619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/gtk/jhbuildrc        2016-06-29 10:28:27 UTC (rev 202618)
+++ trunk/Tools/gtk/jhbuildrc        2016-06-29 10:31:40 UTC (rev 202619)
</span><span class="lines">@@ -34,7 +34,8 @@
</span><span class="cx"> # for a module, so we do it here globally since it's a good idea for all other modules as well.
</span><span class="cx"> buildroot = os.path.join(os.path.dirname(checkoutroot), "Build")
</span><span class="cx">
</span><del>-os.environ['LLVMPIPE_LIBGL_PATH'] = os.path.abspath(os.path.join(buildroot, 'Mesa', 'lib', 'gallium'))
</del><ins>+# For the layout tests: path where llvmpipe/software-only mesa libraries are installed.
+os.environ['LLVMPIPE_LIBGL_PATH'] = os.path.abspath(os.path.join(prefix, 'softGL', 'lib'))
</ins><span class="cx">
</span><span class="cx"> os.environ['CFLAGS'] = '-Wno-error'
</span><span class="cx"> os.environ['CXXFLAGS'] = '-Wno-error'
</span></span></pre></div>
<a id="trunkToolsgtkpatchesxserversearchforDRIdriversatLIBGL_DRIVERS_PATHenvironpatch"></a>
<div class="addfile"><h4>Added: trunk/Tools/gtk/patches/xserver-search-for-DRI-drivers-at-LIBGL_DRIVERS_PATH-environ.patch (0 => 202619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/gtk/patches/xserver-search-for-DRI-drivers-at-LIBGL_DRIVERS_PATH-environ.patch         (rev 0)
+++ trunk/Tools/gtk/patches/xserver-search-for-DRI-drivers-at-LIBGL_DRIVERS_PATH-environ.patch        2016-06-29 10:31:40 UTC (rev 202619)
</span><span class="lines">@@ -0,0 +1,84 @@
</span><ins>+From fcbd29debee422bcb147057a089fd1da5e699656 Mon Sep 17 00:00:00 2001
+From: Carlos Alberto Lopez Perez <clopez@igalia.com>
+Date: Wed, 23 Mar 2016 03:47:58 +0100
+Subject: [PATCH xserver] Search for DRI drivers at LIBGL_DRIVERS_PATH
+ environment variable.
+
+ * The Mesa driver uses this environment variable to override the
+ default compiled search path for DRI drivers.
+
+ * This is useful for testing purposes when the user needs to
+ override the system default one at runtime.
+---
+ glx/glxdricommon.c | 40 ++++++++++++++++++++++++++++++----------
+ 1 file changed, 30 insertions(+), 10 deletions(-)
+
+diff --git a/glx/glxdricommon.c b/glx/glxdricommon.c
+index 62cce13..543f631 100644
+--- a/glx/glxdricommon.c
++++ b/glx/glxdricommon.c
+@@ -246,8 +246,6 @@ glxConvertConfigs(const __DRIcoreExtension * core,
+ return head.next;
+ }
+
+-static const char dri_driver_path[] = DRI_DRIVER_PATH;
+-
+ /* Temporary define to allow building without a dri_interface.h from
+ * updated Mesa. Some day when we don't care about Mesa that old any
+ * more this can be removed.
+@@ -261,22 +259,44 @@ glxProbeDriver(const char *driverName,
+ void **coreExt, const char *coreName, int coreVersion,
+ void **renderExt, const char *renderName, int renderVersion)
+ {
+- int i;
++ int i, len;
+ void *driver;
+ char filename[PATH_MAX];
+ char *get_extensions_name;
+ const __DRIextension **extensions = NULL;
++ const char *dri_driver_path, *p, *next;
+
+- snprintf(filename, sizeof filename, "%s/%s_dri.so",
+- dri_driver_path, driverName);
++ dri_driver_path = getenv("LIBGL_DRIVERS_PATH");
++
++ if (dri_driver_path == NULL)
++ dri_driver_path = DRI_DRIVER_PATH;
++
++ for (p = dri_driver_path; *p; p = next) {
++ next = strchr(p, ':');
++ if (next == NULL) {
++ len = strlen(p);
++ next = p + len;
++ }
++ else {
++ len = next - p;
++ next++;
++ }
++
++ snprintf(filename, sizeof filename, "%.*s/%s_dri.so",
++ len, p, driverName);
++
++ driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL);
++ if (driver == NULL)
++ LogMessage(X_ERROR, "AIGLX error: dlopen of %s failed (%s)\n",
++ filename, dlerror());
++ else
++ break;
+
+- driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL);
+- if (driver == NULL) {
+- LogMessage(X_ERROR, "AIGLX error: dlopen of %s failed (%s)\n",
+- filename, dlerror());
+- goto cleanup_failure;
+ }
+
++ if (driver == NULL)
++ goto cleanup_failure;
++
+ if (asprintf(&get_extensions_name, "%s_%s",
+ __DRI_DRIVER_GET_EXTENSIONS, driverName) != -1) {
+ const __DRIextension **(*get_extensions)(void);
+--
+2.1.4
+
</ins></span></pre>
</div>
</div>
</body>
</html>