mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Switch default renderer to webrender, and update webrender.
This commit is contained in:
parent
c7e1a575a5
commit
f562c426e3
8 changed files with 14 additions and 15 deletions
4
components/servo/Cargo.lock
generated
4
components/servo/Cargo.lock
generated
|
@ -2661,7 +2661,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "webrender"
|
||||
version = "0.5.1"
|
||||
source = "git+https://github.com/servo/webrender#cf945d15c71c757c6694b40a38fd7cfef1a2f827"
|
||||
source = "git+https://github.com/servo/webrender#dfa4246ebe40c78882cdd3e69e776b1e09a2f58e"
|
||||
dependencies = [
|
||||
"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)",
|
||||
|
@ -2686,7 +2686,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "webrender_traits"
|
||||
version = "0.5.1"
|
||||
source = "git+https://github.com/servo/webrender#cf945d15c71c757c6694b40a38fd7cfef1a2f827"
|
||||
source = "git+https://github.com/servo/webrender#dfa4246ebe40c78882cdd3e69e776b1e09a2f58e"
|
||||
dependencies = [
|
||||
"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)",
|
||||
|
|
|
@ -540,7 +540,7 @@ pub fn default_opts() -> Opts {
|
|||
exit_after_load: false,
|
||||
no_native_titlebar: false,
|
||||
enable_vsync: true,
|
||||
use_webrender: false,
|
||||
use_webrender: true,
|
||||
webrender_stats: false,
|
||||
use_msaa: false,
|
||||
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 mut opts = Options::new();
|
||||
opts.optflag("c", "cpu", "CPU painting (default)");
|
||||
opts.optflag("c", "cpu", "CPU painting");
|
||||
opts.optflag("g", "gpu", "GPU painting");
|
||||
opts.optopt("o", "output", "Output file", "output.png");
|
||||
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") ||
|
||||
!PREFS.get("shell.native-titlebar.enabled").as_boolean().unwrap();
|
||||
|
||||
let use_webrender =
|
||||
PREFS.get("gfx.webrender.enabled").as_boolean().unwrap() || opt_match.opt_present("w");
|
||||
let use_webrender = !opt_match.opt_present("c");
|
||||
|
||||
let render_api = match opt_match.opt_str("G") {
|
||||
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]]
|
||||
name = "webrender"
|
||||
version = "0.5.1"
|
||||
source = "git+https://github.com/servo/webrender#cf945d15c71c757c6694b40a38fd7cfef1a2f827"
|
||||
source = "git+https://github.com/servo/webrender#dfa4246ebe40c78882cdd3e69e776b1e09a2f58e"
|
||||
dependencies = [
|
||||
"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)",
|
||||
|
@ -2546,7 +2546,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "webrender_traits"
|
||||
version = "0.5.1"
|
||||
source = "git+https://github.com/servo/webrender#cf945d15c71c757c6694b40a38fd7cfef1a2f827"
|
||||
source = "git+https://github.com/servo/webrender#dfa4246ebe40c78882cdd3e69e776b1e09a2f58e"
|
||||
dependencies = [
|
||||
"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)",
|
||||
|
|
|
@ -6,5 +6,5 @@ uniform sampler2D sCache;
|
|||
|
||||
void main(void) {
|
||||
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/. */
|
||||
|
||||
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 st1 = vec2(src.target_rect.xy + src.target_rect.zw) / 2048.0;
|
||||
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);
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
void main(void) {
|
||||
#ifdef WR_FEATURE_TRANSFORM
|
||||
float alpha = 1;
|
||||
float alpha = 1.f;
|
||||
vec2 local_pos = init_transform_fs(vLocalPos, vLocalRect, alpha);
|
||||
|
||||
// We clamp the texture coordinate calculation here to the local rectangle boundaries,
|
||||
|
@ -14,7 +14,7 @@ void main(void) {
|
|||
vec2 pos_for_texture =
|
||||
clamp(pos, vLocalRect.xy, vLocalRect.xy + vLocalRect.zw) - vLocalRect.xy;
|
||||
#else
|
||||
float alpha = 1;
|
||||
float alpha = 1.f;
|
||||
vec2 local_pos = vLocalPos;
|
||||
vec2 relative_pos_in_rect = vLocalPos - vLocalRect.xy;
|
||||
#endif
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
|
||||
void main(void) {
|
||||
#ifdef WR_FEATURE_TRANSFORM
|
||||
float alpha = 1;
|
||||
float alpha = 1.f;
|
||||
vec2 local_pos = init_transform_fs(vPos, vLocalRect, alpha);
|
||||
#else
|
||||
float alpha = 1;
|
||||
float alpha = 1.f;
|
||||
vec2 local_pos = vPos;
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue