mirror of
https://github.com/servo/servo.git
synced 2025-09-21 20:30:10 +01:00
Auto merge of #13474 - glennw:wr-default, r=Ms2ger
Switch default renderer to webrender, and update webrender. <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13474) <!-- Reviewable:end -->
This commit is contained in:
commit
a082501173
16 changed files with 17 additions and 28 deletions
4
components/servo/Cargo.lock
generated
4
components/servo/Cargo.lock
generated
|
@ -2661,7 +2661,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "webrender"
|
name = "webrender"
|
||||||
version = "0.5.1"
|
version = "0.5.1"
|
||||||
source = "git+https://github.com/servo/webrender#cf945d15c71c757c6694b40a38fd7cfef1a2f827"
|
source = "git+https://github.com/servo/webrender#dfa4246ebe40c78882cdd3e69e776b1e09a2f58e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"bincode 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bincode 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -2686,7 +2686,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "webrender_traits"
|
name = "webrender_traits"
|
||||||
version = "0.5.1"
|
version = "0.5.1"
|
||||||
source = "git+https://github.com/servo/webrender#cf945d15c71c757c6694b40a38fd7cfef1a2f827"
|
source = "git+https://github.com/servo/webrender#dfa4246ebe40c78882cdd3e69e776b1e09a2f58e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
|
|
@ -540,7 +540,7 @@ pub fn default_opts() -> Opts {
|
||||||
exit_after_load: false,
|
exit_after_load: false,
|
||||||
no_native_titlebar: false,
|
no_native_titlebar: false,
|
||||||
enable_vsync: true,
|
enable_vsync: true,
|
||||||
use_webrender: false,
|
use_webrender: true,
|
||||||
webrender_stats: false,
|
webrender_stats: false,
|
||||||
use_msaa: false,
|
use_msaa: false,
|
||||||
render_api: DEFAULT_RENDER_API,
|
render_api: DEFAULT_RENDER_API,
|
||||||
|
@ -556,7 +556,7 @@ pub fn from_cmdline_args(args: &[String]) -> ArgumentParsingResult {
|
||||||
let (app_name, args) = args.split_first().unwrap();
|
let (app_name, args) = args.split_first().unwrap();
|
||||||
|
|
||||||
let mut opts = Options::new();
|
let mut opts = Options::new();
|
||||||
opts.optflag("c", "cpu", "CPU painting (default)");
|
opts.optflag("c", "cpu", "CPU painting");
|
||||||
opts.optflag("g", "gpu", "GPU painting");
|
opts.optflag("g", "gpu", "GPU painting");
|
||||||
opts.optopt("o", "output", "Output file", "output.png");
|
opts.optopt("o", "output", "Output file", "output.png");
|
||||||
opts.optopt("s", "size", "Size of tiles", "512");
|
opts.optopt("s", "size", "Size of tiles", "512");
|
||||||
|
@ -790,8 +790,7 @@ pub fn from_cmdline_args(args: &[String]) -> ArgumentParsingResult {
|
||||||
opt_match.opt_present("b") ||
|
opt_match.opt_present("b") ||
|
||||||
!PREFS.get("shell.native-titlebar.enabled").as_boolean().unwrap();
|
!PREFS.get("shell.native-titlebar.enabled").as_boolean().unwrap();
|
||||||
|
|
||||||
let use_webrender =
|
let use_webrender = !opt_match.opt_present("c");
|
||||||
PREFS.get("gfx.webrender.enabled").as_boolean().unwrap() || opt_match.opt_present("w");
|
|
||||||
|
|
||||||
let render_api = match opt_match.opt_str("G") {
|
let render_api = match opt_match.opt_str("G") {
|
||||||
Some(ref ga) if ga == "gl" => RenderApi::GL,
|
Some(ref ga) if ga == "gl" => RenderApi::GL,
|
||||||
|
|
4
ports/cef/Cargo.lock
generated
4
ports/cef/Cargo.lock
generated
|
@ -2521,7 +2521,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "webrender"
|
name = "webrender"
|
||||||
version = "0.5.1"
|
version = "0.5.1"
|
||||||
source = "git+https://github.com/servo/webrender#cf945d15c71c757c6694b40a38fd7cfef1a2f827"
|
source = "git+https://github.com/servo/webrender#dfa4246ebe40c78882cdd3e69e776b1e09a2f58e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"bincode 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bincode 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -2546,7 +2546,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "webrender_traits"
|
name = "webrender_traits"
|
||||||
version = "0.5.1"
|
version = "0.5.1"
|
||||||
source = "git+https://github.com/servo/webrender#cf945d15c71c757c6694b40a38fd7cfef1a2f827"
|
source = "git+https://github.com/servo/webrender#dfa4246ebe40c78882cdd3e69e776b1e09a2f58e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
|
|
@ -307,7 +307,7 @@ class PackageCommands(CommandBase):
|
||||||
delete(dir_to_package + '/build/' + f)
|
delete(dir_to_package + '/build/' + f)
|
||||||
print("Writing runservo.sh")
|
print("Writing runservo.sh")
|
||||||
# TODO: deduplicate this arg list from post_build_commands
|
# TODO: deduplicate this arg list from post_build_commands
|
||||||
servo_args = ['-w', '-b',
|
servo_args = ['-b',
|
||||||
'--pref', 'dom.mozbrowser.enabled',
|
'--pref', 'dom.mozbrowser.enabled',
|
||||||
'--pref', 'dom.forcetouch.enabled',
|
'--pref', 'dom.forcetouch.enabled',
|
||||||
'--pref', 'shell.builtin-key-shortcuts.enabled=false',
|
'--pref', 'shell.builtin-key-shortcuts.enabled=false',
|
||||||
|
|
|
@ -98,8 +98,7 @@ class PostBuildCommands(CommandBase):
|
||||||
# Convert to a relative path to avoid mingw -> Windows path conversions
|
# Convert to a relative path to avoid mingw -> Windows path conversions
|
||||||
browserhtml_path = path.relpath(browserhtml_path, os.getcwd())
|
browserhtml_path = path.relpath(browserhtml_path, os.getcwd())
|
||||||
|
|
||||||
args = args + ['-w',
|
args = args + ['--pref', 'dom.mozbrowser.enabled',
|
||||||
'--pref', 'dom.mozbrowser.enabled',
|
|
||||||
'--pref', 'dom.forcetouch.enabled',
|
'--pref', 'dom.forcetouch.enabled',
|
||||||
'--pref', 'shell.builtin-key-shortcuts.enabled=false',
|
'--pref', 'shell.builtin-key-shortcuts.enabled=false',
|
||||||
path.join(browserhtml_path, 'out', 'index.html')]
|
path.join(browserhtml_path, 'out', 'index.html')]
|
||||||
|
|
|
@ -6,5 +6,4 @@
|
||||||
# lines (the "-p" and "10" are separate even though they are related).
|
# lines (the "-p" and "10" are separate even though they are related).
|
||||||
|
|
||||||
servo
|
servo
|
||||||
-w
|
|
||||||
http://en.wikipedia.org/wiki/Rust
|
http://en.wikipedia.org/wiki/Rust
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
"dom.serviceworker.timeout_seconds": 60,
|
"dom.serviceworker.timeout_seconds": 60,
|
||||||
"dom.testable_crash.enabled": false,
|
"dom.testable_crash.enabled": false,
|
||||||
"dom.testbinding.enabled": false,
|
"dom.testbinding.enabled": false,
|
||||||
"gfx.webrender.enabled": true,
|
|
||||||
"js.baseline.enabled": true,
|
"js.baseline.enabled": true,
|
||||||
"js.ion.enabled": true,
|
"js.ion.enabled": true,
|
||||||
"js.asmjs.enabled": true,
|
"js.asmjs.enabled": true,
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
"dom.serviceworker.timeout_seconds": 60,
|
"dom.serviceworker.timeout_seconds": 60,
|
||||||
"dom.testable_crash.enabled": false,
|
"dom.testable_crash.enabled": false,
|
||||||
"dom.testbinding.enabled": false,
|
"dom.testbinding.enabled": false,
|
||||||
"gfx.webrender.enabled": false,
|
|
||||||
"js.baseline.enabled": true,
|
"js.baseline.enabled": true,
|
||||||
"js.ion.enabled": true,
|
"js.ion.enabled": true,
|
||||||
"js.asmjs.enabled": true,
|
"js.asmjs.enabled": true,
|
||||||
|
|
|
@ -6,5 +6,5 @@ uniform sampler2D sCache;
|
||||||
|
|
||||||
void main(void) {
|
void main(void) {
|
||||||
vec4 color = texture(sCache, vUv);
|
vec4 color = texture(sCache, vUv);
|
||||||
oFragColor = vec4(color.rgb, color.a * vOpacity);
|
oFragColor = vec4(color.rgb * vBrightnessOpacity.x, color.a * vBrightnessOpacity.y);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,4 +3,4 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
varying vec2 vUv;
|
varying vec2 vUv;
|
||||||
varying float vOpacity;
|
varying vec2 vBrightnessOpacity;
|
||||||
|
|
|
@ -15,7 +15,7 @@ void main(void) {
|
||||||
vec2 st0 = vec2(src.target_rect.xy) / 2048.0;
|
vec2 st0 = vec2(src.target_rect.xy) / 2048.0;
|
||||||
vec2 st1 = vec2(src.target_rect.xy + src.target_rect.zw) / 2048.0;
|
vec2 st1 = vec2(src.target_rect.xy + src.target_rect.zw) / 2048.0;
|
||||||
vUv = mix(st0, st1, aPosition.xy);
|
vUv = mix(st0, st1, aPosition.xy);
|
||||||
vOpacity = blend.src_id_target_id_opacity.z;
|
vBrightnessOpacity = blend.src_id_target_id_opacity.zw;
|
||||||
|
|
||||||
gl_Position = uTransform * vec4(local_pos, 0, 1);
|
gl_Position = uTransform * vec4(local_pos, 0, 1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
void main(void) {
|
void main(void) {
|
||||||
#ifdef WR_FEATURE_TRANSFORM
|
#ifdef WR_FEATURE_TRANSFORM
|
||||||
float alpha = 1;
|
float alpha = 1.f;
|
||||||
vec2 local_pos = init_transform_fs(vLocalPos, vLocalRect, alpha);
|
vec2 local_pos = init_transform_fs(vLocalPos, vLocalRect, alpha);
|
||||||
|
|
||||||
// We clamp the texture coordinate calculation here to the local rectangle boundaries,
|
// We clamp the texture coordinate calculation here to the local rectangle boundaries,
|
||||||
|
@ -14,7 +14,7 @@ void main(void) {
|
||||||
vec2 pos_for_texture =
|
vec2 pos_for_texture =
|
||||||
clamp(pos, vLocalRect.xy, vLocalRect.xy + vLocalRect.zw) - vLocalRect.xy;
|
clamp(pos, vLocalRect.xy, vLocalRect.xy + vLocalRect.zw) - vLocalRect.xy;
|
||||||
#else
|
#else
|
||||||
float alpha = 1;
|
float alpha = 1.f;
|
||||||
vec2 local_pos = vLocalPos;
|
vec2 local_pos = vLocalPos;
|
||||||
vec2 relative_pos_in_rect = vLocalPos - vLocalRect.xy;
|
vec2 relative_pos_in_rect = vLocalPos - vLocalRect.xy;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
|
|
||||||
void main(void) {
|
void main(void) {
|
||||||
#ifdef WR_FEATURE_TRANSFORM
|
#ifdef WR_FEATURE_TRANSFORM
|
||||||
float alpha = 1;
|
float alpha = 1.f;
|
||||||
vec2 local_pos = init_transform_fs(vPos, vLocalRect, alpha);
|
vec2 local_pos = init_transform_fs(vPos, vLocalRect, alpha);
|
||||||
#else
|
#else
|
||||||
float alpha = 1;
|
float alpha = 1.f;
|
||||||
vec2 local_pos = vPos;
|
vec2 local_pos = vPos;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
[css-filters-animation-brightness.htm]
|
[css-filters-animation-brightness.htm]
|
||||||
type: reftest
|
type: reftest
|
||||||
expected: CRASH
|
expected: FAIL
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
[filters-test-brightness-001.htm]
|
|
||||||
type: reftest
|
|
||||||
expected: CRASH
|
|
|
@ -1,3 +0,0 @@
|
||||||
[filters-test-brightness-002.htm]
|
|
||||||
type: reftest
|
|
||||||
expected: CRASH
|
|
Loading…
Add table
Add a link
Reference in a new issue