aboutsummaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorBastien Orivel <eijebong@bananium.fr>2018-02-16 02:58:54 +0100
committerBastien Orivel <eijebong@bananium.fr>2018-02-24 13:50:03 +0100
commitfae2d9839fa5f8828a41402210d03092797db7ef (patch)
treedb4230d9f28ffd8123517ce314be72e64723500d /components
parentcccca27f4fd3d9cd5f2f5ee2853672fecc8a7b4b (diff)
downloadservo-fae2d9839fa5f8828a41402210d03092797db7ef.tar.gz
servo-fae2d9839fa5f8828a41402210d03092797db7ef.zip
Bump rayon to 1.0
Diffstat (limited to 'components')
-rw-r--r--components/layout/Cargo.toml2
-rw-r--r--components/layout_thread/Cargo.toml2
-rw-r--r--components/layout_thread/lib.rs11
-rw-r--r--components/style/Cargo.toml2
-rw-r--r--components/style/gecko/global_style_data.rs8
5 files changed, 13 insertions, 12 deletions
diff --git a/components/layout/Cargo.toml b/components/layout/Cargo.toml
index 88552e1ce16..3ff251e28f3 100644
--- a/components/layout/Cargo.toml
+++ b/components/layout/Cargo.toml
@@ -31,7 +31,7 @@ ordered-float = "0.4"
parking_lot = "0.4"
profile_traits = {path = "../profile_traits"}
range = {path = "../range"}
-rayon = "0.8"
+rayon = "1"
script_layout_interface = {path = "../script_layout_interface"}
script_traits = {path = "../script_traits"}
selectors = { path = "../selectors" }
diff --git a/components/layout_thread/Cargo.toml b/components/layout_thread/Cargo.toml
index 661a7f849de..2d4815204e4 100644
--- a/components/layout_thread/Cargo.toml
+++ b/components/layout_thread/Cargo.toml
@@ -33,7 +33,7 @@ net_traits = {path = "../net_traits"}
parking_lot = "0.4"
profile_traits = {path = "../profile_traits"}
range = {path = "../range"}
-rayon = "0.8"
+rayon = "1"
script = {path = "../script"}
script_layout_interface = {path = "../script_layout_interface"}
script_traits = {path = "../script_traits"}
diff --git a/components/layout_thread/lib.rs b/components/layout_thread/lib.rs
index a5c3e03293f..5347a4032a9 100644
--- a/components/layout_thread/lib.rs
+++ b/components/layout_thread/lib.rs
@@ -457,11 +457,12 @@ impl LayoutThread {
opts::get().initial_window_size.to_f32() * TypedScale::new(1.0),
TypedScale::new(opts::get().device_pixels_per_px.unwrap_or(1.0)));
- let configuration =
- rayon::Configuration::new().num_threads(layout_threads)
- .start_handler(|_| thread_state::initialize_layout_worker_thread());
+ let workers =
+ rayon::ThreadPoolBuilder::new().num_threads(layout_threads)
+ .start_handler(|_| thread_state::initialize_layout_worker_thread())
+ .build();
let parallel_traversal = if layout_threads > 1 {
- Some(rayon::ThreadPool::new(configuration).expect("ThreadPool creation failed"))
+ Some(workers.expect("ThreadPool creation failed"))
} else {
None
};
@@ -708,7 +709,7 @@ impl LayoutThread {
let mut txn = webrender_api::Transaction::new();
txn.scroll_node_with_id(
webrender_api::LayoutPoint::from_untyped(&point),
- webrender_api::ScrollNodeIdType::ExternalScrollId(state.scroll_id),
+ state.scroll_id,
webrender_api::ScrollClamping::ToContentBounds
);
self.webrender_api.send_transaction(self.webrender_document, txn);
diff --git a/components/style/Cargo.toml b/components/style/Cargo.toml
index 915308030b6..e8a5ba3fceb 100644
--- a/components/style/Cargo.toml
+++ b/components/style/Cargo.toml
@@ -54,7 +54,7 @@ ordered-float = "0.4"
owning_ref = "0.3.3"
parking_lot = "0.4"
precomputed-hash = "0.1.1"
-rayon = "0.8.2"
+rayon = "1"
selectors = { path = "../selectors" }
serde = {version = "1.0", optional = true, features = ["derive"]}
servo_arc = { path = "../servo_arc" }
diff --git a/components/style/gecko/global_style_data.rs b/components/style/gecko/global_style_data.rs
index 4a6dcc21805..640cba2e0f1 100644
--- a/components/style/gecko/global_style_data.rs
+++ b/components/style/gecko/global_style_data.rs
@@ -85,7 +85,7 @@ lazy_static! {
let pool = if num_threads < 1 || unsafe { !bindings::Gecko_ShouldCreateStyleThreadPool() } {
None
} else {
- let configuration = rayon::Configuration::new()
+ let workers = rayon::ThreadPoolBuilder::new()
.num_threads(num_threads)
// Enable a breadth-first rayon traversal. This causes the work
// queue to be always FIFO, rather than FIFO for stealers and
@@ -96,9 +96,9 @@ lazy_static! {
.thread_name(thread_name)
.start_handler(thread_startup)
.exit_handler(thread_shutdown)
- .stack_size(STYLE_THREAD_STACK_SIZE_KB * 1024);
- let pool = rayon::ThreadPool::new(configuration).ok();
- pool
+ .stack_size(STYLE_THREAD_STACK_SIZE_KB * 1024)
+ .build();
+ workers.ok()
};
StyleThreadPool {