diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2018-02-27 00:10:51 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-27 00:10:51 -0500 |
commit | b6bd719c5dfa1dd5bb1900d31d318250cb54271e (patch) | |
tree | ea9d0d98735fd3125e6407e6867b86d045e0cf01 /components/layout_thread | |
parent | 6df0dc5b2710a6ba856de7c064a6631a8d63efc5 (diff) | |
parent | 2442c7cabe5473df4f837fecc5ff5d8da769dcd4 (diff) | |
download | servo-b6bd719c5dfa1dd5bb1900d31d318250cb54271e.tar.gz servo-b6bd719c5dfa1dd5bb1900d31d318250cb54271e.zip |
Auto merge of #20058 - Eijebong:rayon1.0, r=jdm
Bump rayon to 1.0
<!-- 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/20058)
<!-- Reviewable:end -->
Diffstat (limited to 'components/layout_thread')
-rw-r--r-- | components/layout_thread/Cargo.toml | 2 | ||||
-rw-r--r-- | components/layout_thread/lib.rs | 11 |
2 files changed, 7 insertions, 6 deletions
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 4e55daaab6a..2ce013f658c 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 }; @@ -709,7 +710,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); |