mirror of
https://github.com/servo/servo.git
synced 2025-06-28 11:03:39 +01:00
Auto merge of #25853 - asajeffrey:surfmanup, r=jdm
Replace glutin by winit + surfman 0.2 <!-- Please describe your changes on the following line: --> This PR updates surfman to 0.2, and replaces glutin with winit+surfman. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes do not require tests because this should all be invisible <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
This commit is contained in:
commit
306e8ac5f9
94 changed files with 2265 additions and 1513 deletions
|
@ -223,34 +223,6 @@ def append_to_path_env(string, env, name):
|
|||
env[name] = variable
|
||||
|
||||
|
||||
def set_osmesa_env(bin_path, env, show_vars):
|
||||
"""Set proper LD_LIBRARY_PATH and DRIVE for software rendering on Linux and OSX"""
|
||||
if is_linux():
|
||||
dep_path = find_dep_path_newest('osmesa-src', bin_path)
|
||||
if not dep_path:
|
||||
return None
|
||||
osmesa_path = path.join(dep_path, "out", "lib", "gallium")
|
||||
append_to_path_env(osmesa_path, env, "LD_LIBRARY_PATH")
|
||||
env["GALLIUM_DRIVER"] = "softpipe"
|
||||
if show_vars:
|
||||
print("GALLIUM_DRIVER=" + env["GALLIUM_DRIVER"])
|
||||
print("LD_LIBRARY_PATH=" + env["LD_LIBRARY_PATH"])
|
||||
elif is_macosx():
|
||||
osmesa_dep_path = find_dep_path_newest('osmesa-src', bin_path)
|
||||
if not osmesa_dep_path:
|
||||
return None
|
||||
osmesa_path = path.join(osmesa_dep_path,
|
||||
"out", "src", "gallium", "targets", "osmesa", ".libs")
|
||||
glapi_path = path.join(osmesa_dep_path,
|
||||
"out", "src", "mapi", "shared-glapi", ".libs")
|
||||
append_to_path_env(osmesa_path + ":" + glapi_path, env, "DYLD_LIBRARY_PATH")
|
||||
env["GALLIUM_DRIVER"] = "softpipe"
|
||||
if show_vars:
|
||||
print("GALLIUM_DRIVER=" + env["GALLIUM_DRIVER"])
|
||||
print("DYLD_LIBRARY_PATH=" + env["DYLD_LIBRARY_PATH"])
|
||||
return env
|
||||
|
||||
|
||||
def gstreamer_root(target, env, topdir=None):
|
||||
if is_windows():
|
||||
arch = {
|
||||
|
|
|
@ -24,7 +24,7 @@ from mach.decorators import (
|
|||
from servo.command_base import (
|
||||
CommandBase,
|
||||
check_call, check_output, BIN_SUFFIX,
|
||||
is_linux, set_osmesa_env,
|
||||
is_linux,
|
||||
)
|
||||
|
||||
|
||||
|
@ -126,7 +126,6 @@ class PostBuildCommands(CommandBase):
|
|||
args = [bin or self.get_nightly_binary_path(nightly) or self.get_binary_path(release, dev)]
|
||||
|
||||
if headless:
|
||||
set_osmesa_env(args[0], env, debugger is not None)
|
||||
args.append('-z')
|
||||
|
||||
if software:
|
||||
|
|
|
@ -33,8 +33,8 @@ from mach.decorators import (
|
|||
)
|
||||
|
||||
from servo.command_base import (
|
||||
BuildNotFound, CommandBase,
|
||||
call, check_call, check_output, set_osmesa_env,
|
||||
CommandBase,
|
||||
call, check_call, check_output,
|
||||
)
|
||||
from servo.util import host_triple
|
||||
|
||||
|
@ -197,8 +197,6 @@ class MachCommands(CommandBase):
|
|||
@CommandArgument('--submit', '-a', default=False, action="store_true",
|
||||
help="submit the data to perfherder")
|
||||
def test_perf(self, base=None, date=None, submit=False):
|
||||
self.set_software_rendering_env(True, False)
|
||||
|
||||
env = self.build_env()
|
||||
cmd = ["bash", "test_perf.sh"]
|
||||
if base:
|
||||
|
@ -443,8 +441,6 @@ class MachCommands(CommandBase):
|
|||
|
||||
# Helper for test_css and test_wpt:
|
||||
def wptrunner(self, run_file, **kwargs):
|
||||
self.set_software_rendering_env(kwargs['release'], kwargs['debugger'])
|
||||
|
||||
# By default, Rayon selects the number of worker threads
|
||||
# based on the available CPU count. This doesn't work very
|
||||
# well when running tests on CI, since we run so many
|
||||
|
@ -755,18 +751,6 @@ class MachCommands(CommandBase):
|
|||
return check_call(
|
||||
[run_file, "|".join(tests), bin_path, base_dir])
|
||||
|
||||
def set_software_rendering_env(self, use_release, show_vars):
|
||||
# On Linux and mac, find the OSMesa software rendering library and
|
||||
# add it to the dynamic linker search path.
|
||||
try:
|
||||
bin_path = self.get_binary_path(use_release, not use_release)
|
||||
if not set_osmesa_env(bin_path, os.environ, show_vars):
|
||||
print("Warning: Cannot set the path to OSMesa library.")
|
||||
except BuildNotFound:
|
||||
# This can occur when cross compiling (e.g. arm64), in which case
|
||||
# we won't run the tests anyway so can safely ignore this step.
|
||||
pass
|
||||
|
||||
|
||||
def setup_clangfmt(env):
|
||||
cmd = "clang-format.exe" if sys.platform == "win32" else "clang-format"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue