Bug 1517721 - Update webrender to commit 12250134e710e8a0435b1b678fa4fb056e11fecc (WR PR #3468). r=kats
authorWR Updater Bot <graphics-team@mozilla.staktrace.com>
Fri, 04 Jan 2019 15:38:59 +0000
changeset 509652 7bb587c935d11d28f5e2720dc6a4a3ef199d6a0d
parent 509651 5f6139ef7c2cc63904a73d6fe8b52031a295784d
child 509653 88b380a9493b93fcdc0532fff6910b7e0760a761
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1517721
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1517721 - Update webrender to commit 12250134e710e8a0435b1b678fa4fb056e11fecc (WR PR #3468). r=kats https://github.com/servo/webrender/pull/3468 Differential Revision: https://phabricator.services.mozilla.com/D15726
gfx/webrender_bindings/revision.txt
gfx/wr/wrench/script/headless.py
--- a/gfx/webrender_bindings/revision.txt
+++ b/gfx/webrender_bindings/revision.txt
@@ -1,1 +1,1 @@
-a40a5ffd1649d6bf6f55b76c7d633e4d157d4478
+12250134e710e8a0435b1b678fa4fb056e11fecc
--- a/gfx/wr/wrench/script/headless.py
+++ b/gfx/wr/wrench/script/headless.py
@@ -44,16 +44,37 @@ def is_windows():
 def is_macos():
     return sys.platform == 'darwin'
 
 
 def is_linux():
     return sys.platform.startswith('linux')
 
 
+def debugger():
+    if "DEBUGGER" in os.environ:
+        return os.environ["DEBUGGER"]
+    return None
+
+
+def use_gdb():
+    return debugger() in ['gdb', 'cgdb', 'rust-gdb']
+
+
+def use_rr():
+    return debugger() == 'rr'
+
+
+def optimized_build():
+    if "OPTIMIZED" in os.environ:
+        opt = os.environ["OPTIMIZED"]
+        return opt not in ["0", "false"]
+    return True
+
+
 def set_osmesa_env(bin_path):
     """Set proper LD_LIBRARY_PATH and DRIVE for software rendering on Linux and OSX"""
     if is_linux():
         osmesa_path = path.join(find_dep_path_newest('osmesa-src', bin_path), "out", "lib", "gallium")
         print(osmesa_path)
         os.environ["LD_LIBRARY_PATH"] = osmesa_path
         os.environ["GALLIUM_DRIVER"] = "softpipe"
     elif is_macos():
@@ -62,16 +83,39 @@ def set_osmesa_env(bin_path):
         glapi_path = path.join(find_dep_path_newest('osmesa-src', bin_path),
                                "out", "src", "mapi", "shared-glapi", ".libs")
         os.environ["DYLD_LIBRARY_PATH"] = osmesa_path + ":" + glapi_path
         os.environ["GALLIUM_DRIVER"] = "softpipe"
 
 
 extra_flags = os.getenv('CARGOFLAGS', None)
 extra_flags = extra_flags.split(' ') if extra_flags else []
-subprocess.check_call(['cargo', 'build'] + extra_flags + ['--release', '--verbose', '--features', 'headless'])
-set_osmesa_env('../target/release/')
+build_cmd = ['cargo', 'build'] + extra_flags + ['--verbose', '--features', 'headless']
+if optimized_build():
+    build_cmd += ['--release']
+
+objdir = ''
+if optimized_build():
+    objdir = '../target/release/'
+else:
+    objdir = '../target/debug/'
+
+subprocess.check_call(build_cmd)
+
+set_osmesa_env(objdir)
+
+dbg_cmd = []
+if use_rr():
+    dbg_cmd = ['rr', 'record']
+elif use_gdb():
+    dbg_cmd = [debugger(), '--args']
+elif debugger():
+    print("Unknown debugger: " + debugger())
+    sys.exit(1)
+
 # TODO(gw): We have an occasional accuracy issue or bug (could be WR or OSMesa)
 #           where the output of a previous test that uses intermediate targets can
 #           cause 1.0 / 255.0 pixel differences in a subsequent test. For now, we
 #           run tests with no-scissor mode, which ensures a complete target clear
 #           between test runs. But we should investigate this further...
-subprocess.check_call(['../target/release/wrench', '--no-scissor', '-h'] + sys.argv[1:])
+cmd = dbg_cmd + [objdir + '/wrench', '--no-scissor', '-h'] + sys.argv[1:]
+print('Running: `' + ' '.join(cmd) + '`')
+subprocess.check_call(cmd)