mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
style: Make Servo use a single thread-pool for layout-related tasks per-process.
Instead of per-document. This also allows to reuse this thread-pool if needed for other stuff, like parallel CSS parsing (#22478), and to share more code with Gecko, which is always nice.
This commit is contained in:
parent
27bb33cb9e
commit
006e71c7de
12 changed files with 56 additions and 77 deletions
|
@ -38,7 +38,6 @@ use script_traits::{
|
|||
WindowSizeData,
|
||||
};
|
||||
use script_traits::{NewLayoutInfo, ScriptMsg};
|
||||
use servo_config::prefs::PREFS;
|
||||
use servo_url::ServoUrl;
|
||||
use std::cell::Cell;
|
||||
use style::attr::{AttrValue, LengthOrPercentageOrAuto};
|
||||
|
@ -204,7 +203,6 @@ impl HTMLIFrameElement {
|
|||
},
|
||||
device_pixel_ratio: window.device_pixel_ratio(),
|
||||
},
|
||||
layout_threads: PREFS.get("layout.threads").as_u64().expect("count") as usize,
|
||||
};
|
||||
|
||||
self.pipeline_id.set(Some(new_pipeline_id));
|
||||
|
|
|
@ -45,7 +45,6 @@ use msg::constellation_msg::BrowsingContextId;
|
|||
use msg::constellation_msg::PipelineId;
|
||||
use msg::constellation_msg::TopLevelBrowsingContextId;
|
||||
use script_traits::{AuxiliaryBrowsingContextLoadInfo, LoadData, NewLayoutInfo, ScriptMsg};
|
||||
use servo_config::prefs::PREFS;
|
||||
use servo_url::ServoUrl;
|
||||
use std::cell::Cell;
|
||||
use std::ptr;
|
||||
|
@ -290,7 +289,6 @@ impl WindowProxy {
|
|||
pipeline_port: pipeline_receiver,
|
||||
content_process_shutdown_chan: None,
|
||||
window_size: window.window_size(),
|
||||
layout_threads: PREFS.get("layout.threads").as_u64().expect("count") as usize,
|
||||
};
|
||||
let constellation_msg = ScriptMsg::ScriptNewAuxiliary(load_info, pipeline_sender);
|
||||
window.send_to_constellation(constellation_msg);
|
||||
|
|
|
@ -1910,7 +1910,6 @@ impl ScriptThread {
|
|||
window_size,
|
||||
pipeline_port,
|
||||
content_process_shutdown_chan,
|
||||
layout_threads,
|
||||
} = new_layout_info;
|
||||
|
||||
let layout_pair = unbounded();
|
||||
|
@ -1927,7 +1926,6 @@ impl ScriptThread {
|
|||
script_chan: self.control_chan.clone(),
|
||||
image_cache: self.image_cache.clone(),
|
||||
content_process_shutdown_chan: content_process_shutdown_chan,
|
||||
layout_threads: layout_threads,
|
||||
paint_time_metrics: PaintTimeMetrics::new(
|
||||
new_pipeline_id,
|
||||
self.time_profiler_chan.clone(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue