mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Auto merge of #13711 - glennw:remove-old-renderer, r=larsbergstrom
Remove old rendering backend. This removes paint threads, rust-layers dependency, and changes optional webrender types to be required. The use_webrender option has been removed, however I've left the "-w" command line option in place for now so that wpt runner can continue to pass that. Once it's removed from there we can also remove the -w option. Once this stage is complete, it should be fine to change the display list building code to generate webrender display lists directly and avoid the conversion step. <!-- 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/13711) <!-- Reviewable:end -->
This commit is contained in:
commit
f96718d03d
55 changed files with 422 additions and 3611 deletions
38
components/servo/Cargo.lock
generated
38
components/servo/Cargo.lock
generated
|
@ -321,14 +321,11 @@ dependencies = [
|
|||
name = "compositing"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"azure 0.9.0 (git+https://github.com/servo/rust-azure)",
|
||||
"euclid 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gfx_traits 0.0.1",
|
||||
"gleam 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"image 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"layers 0.5.3 (git+https://github.com/servo/rust-layers)",
|
||||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"msg 0.0.1",
|
||||
"net_traits 0.0.1",
|
||||
|
@ -359,7 +356,6 @@ dependencies = [
|
|||
"gfx 0.0.1",
|
||||
"gfx_traits 0.0.1",
|
||||
"ipc-channel 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"layers 0.5.3 (git+https://github.com/servo/rust-layers)",
|
||||
"layout_traits 0.0.1",
|
||||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"msg 0.0.1",
|
||||
|
@ -797,7 +793,6 @@ dependencies = [
|
|||
"heapsize 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"heapsize_plugin 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"layers 0.5.3 (git+https://github.com/servo/rust-layers)",
|
||||
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -806,8 +801,6 @@ dependencies = [
|
|||
"net_traits 0.0.1",
|
||||
"ordered-float 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"plugins 0.0.1",
|
||||
"profile_traits 0.0.1",
|
||||
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"range 0.0.1",
|
||||
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 0.8.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -841,13 +834,9 @@ name = "gfx_traits"
|
|||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"azure 0.9.0 (git+https://github.com/servo/rust-azure)",
|
||||
"euclid 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"heapsize 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"heapsize_plugin 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"layers 0.5.3 (git+https://github.com/servo/rust-layers)",
|
||||
"msg 0.0.1",
|
||||
"plugins 0.0.1",
|
||||
"profile_traits 0.0.1",
|
||||
"range 0.0.1",
|
||||
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 0.8.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -894,8 +883,8 @@ dependencies = [
|
|||
"compositing 0.0.1",
|
||||
"euclid 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gfx_traits 0.0.1",
|
||||
"gleam 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"layers 0.5.3 (git+https://github.com/servo/rust-layers)",
|
||||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"msg 0.0.1",
|
||||
"net_traits 0.0.1",
|
||||
|
@ -1140,26 +1129,6 @@ name = "language-tags"
|
|||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "layers"
|
||||
version = "0.5.3"
|
||||
source = "git+https://github.com/servo/rust-layers#b064de859b2cf3f4e07b29ee11a34543f1671ac0"
|
||||
dependencies = [
|
||||
"cgl 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"core-foundation 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gleam 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"glx 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"heapsize 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"io-surface 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo-egl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo-skia 0.20130412.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"x11 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "layout"
|
||||
version = "0.0.1"
|
||||
|
@ -1250,7 +1219,6 @@ dependencies = [
|
|||
"profile_traits 0.0.1",
|
||||
"script_traits 0.0.1",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
"webrender_traits 0.6.0 (git+https://github.com/servo/webrender)",
|
||||
]
|
||||
|
||||
|
@ -2049,7 +2017,6 @@ dependencies = [
|
|||
"string_cache 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"style 0.0.1",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2076,7 +2043,6 @@ dependencies = [
|
|||
"heapsize_plugin 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper_serde 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"layers 0.5.3 (git+https://github.com/servo/rust-layers)",
|
||||
"libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"msg 0.0.1",
|
||||
"net_traits 0.0.1",
|
||||
|
@ -2089,7 +2055,6 @@ dependencies = [
|
|||
"style_traits 0.0.1",
|
||||
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2916,7 +2881,6 @@ dependencies = [
|
|||
"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
|
||||
"checksum khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "09c9d3760673c427d46f91a0350f0a84a52e6bc5a84adf26dc610b6c52436630"
|
||||
"checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a"
|
||||
"checksum layers 0.5.3 (git+https://github.com/servo/rust-layers)" = "<none>"
|
||||
"checksum lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "cf186d1a8aa5f5bee5fd662bc9c1b949e0259e1bcc379d1f006847b0080c7417"
|
||||
"checksum lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "49247ec2a285bb3dcb23cbd9c35193c025e7251bfce77c1d5da97e6362dffe7f"
|
||||
"checksum leak 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bd100e01f1154f2908dfa7d02219aeab25d0b9c7fa955164192e3245255a0c73"
|
||||
|
|
|
@ -133,57 +133,50 @@ impl<Window> Browser<Window> where Window: WindowMethods + 'static {
|
|||
devtools::start_server(port)
|
||||
});
|
||||
|
||||
let (webrender, webrender_api_sender) = if opts::get().use_webrender {
|
||||
if let Ok(mut resource_path) = resources_dir_path() {
|
||||
resource_path.push("shaders");
|
||||
let mut resource_path = resources_dir_path().unwrap();
|
||||
resource_path.push("shaders");
|
||||
|
||||
// TODO(gw): Duplicates device_pixels_per_screen_px from compositor. Tidy up!
|
||||
let scale_factor = window.scale_factor().get();
|
||||
let device_pixel_ratio = match opts.device_pixels_per_px {
|
||||
Some(device_pixels_per_px) => device_pixels_per_px,
|
||||
None => match opts.output_file {
|
||||
Some(_) => 1.0,
|
||||
None => scale_factor,
|
||||
}
|
||||
};
|
||||
let (webrender, webrender_api_sender) = {
|
||||
// TODO(gw): Duplicates device_pixels_per_screen_px from compositor. Tidy up!
|
||||
let scale_factor = window.scale_factor().get();
|
||||
let device_pixel_ratio = match opts.device_pixels_per_px {
|
||||
Some(device_pixels_per_px) => device_pixels_per_px,
|
||||
None => match opts.output_file {
|
||||
Some(_) => 1.0,
|
||||
None => scale_factor,
|
||||
}
|
||||
};
|
||||
|
||||
let renderer_kind = if opts::get().should_use_osmesa() {
|
||||
webrender_traits::RendererKind::OSMesa
|
||||
} else {
|
||||
webrender_traits::RendererKind::Native
|
||||
};
|
||||
|
||||
let (webrender, webrender_sender) =
|
||||
webrender::Renderer::new(webrender::RendererOptions {
|
||||
device_pixel_ratio: device_pixel_ratio,
|
||||
resource_path: resource_path,
|
||||
enable_aa: opts.enable_text_antialiasing,
|
||||
enable_msaa: opts.use_msaa,
|
||||
enable_profiler: opts.webrender_stats,
|
||||
debug: opts.webrender_debug,
|
||||
enable_recording: false,
|
||||
precache_shaders: opts.precache_shaders,
|
||||
enable_scrollbars: opts.output_file.is_none(),
|
||||
renderer_kind: renderer_kind,
|
||||
});
|
||||
(Some(webrender), Some(webrender_sender))
|
||||
let renderer_kind = if opts::get().should_use_osmesa() {
|
||||
webrender_traits::RendererKind::OSMesa
|
||||
} else {
|
||||
(None, None)
|
||||
}
|
||||
} else {
|
||||
(None, None)
|
||||
webrender_traits::RendererKind::Native
|
||||
};
|
||||
|
||||
webrender::Renderer::new(webrender::RendererOptions {
|
||||
device_pixel_ratio: device_pixel_ratio,
|
||||
resource_path: resource_path,
|
||||
enable_aa: opts.enable_text_antialiasing,
|
||||
enable_msaa: opts.use_msaa,
|
||||
enable_profiler: opts.webrender_stats,
|
||||
debug: opts.webrender_debug,
|
||||
enable_recording: false,
|
||||
precache_shaders: opts.precache_shaders,
|
||||
enable_scrollbars: opts.output_file.is_none(),
|
||||
renderer_kind: renderer_kind,
|
||||
})
|
||||
};
|
||||
|
||||
// Create the constellation, which maintains the engine
|
||||
// pipelines, including the script and layout threads, as well
|
||||
// as the navigation context.
|
||||
let (constellation_chan, sw_senders) = create_constellation(opts.clone(),
|
||||
compositor_proxy.clone_compositor_proxy(),
|
||||
time_profiler_chan.clone(),
|
||||
mem_profiler_chan.clone(),
|
||||
devtools_chan,
|
||||
supports_clipboard,
|
||||
webrender_api_sender.clone());
|
||||
compositor_proxy.clone_compositor_proxy(),
|
||||
time_profiler_chan.clone(),
|
||||
mem_profiler_chan.clone(),
|
||||
devtools_chan,
|
||||
supports_clipboard,
|
||||
webrender_api_sender.clone());
|
||||
|
||||
// Send the constellation's swmanager sender to service worker manager thread
|
||||
script::init(sw_senders);
|
||||
|
@ -247,7 +240,7 @@ fn create_constellation(opts: opts::Opts,
|
|||
mem_profiler_chan: mem::ProfilerChan,
|
||||
devtools_chan: Option<Sender<devtools_traits::DevtoolsControlMsg>>,
|
||||
supports_clipboard: bool,
|
||||
webrender_api_sender: Option<webrender_traits::RenderApiSender>)
|
||||
webrender_api_sender: webrender_traits::RenderApiSender)
|
||||
-> (Sender<ConstellationMsg>, SWManagerSenders) {
|
||||
let bluetooth_thread: IpcSender<BluetoothMethodMsg> = BluetoothThreadFactory::new();
|
||||
|
||||
|
@ -257,9 +250,9 @@ fn create_constellation(opts: opts::Opts,
|
|||
time_profiler_chan.clone(),
|
||||
opts.config_dir.map(Into::into));
|
||||
let image_cache_thread = new_image_cache_thread(public_resource_threads.sender(),
|
||||
webrender_api_sender.as_ref().map(|wr| wr.create_api()));
|
||||
webrender_api_sender.create_api());
|
||||
let font_cache_thread = FontCacheThread::new(public_resource_threads.sender(),
|
||||
webrender_api_sender.as_ref().map(|wr| wr.create_api()));
|
||||
Some(webrender_api_sender.create_api()));
|
||||
|
||||
let resource_sender = public_resource_threads.sender();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue