diff options
author | Bastien Orivel <eijebong@bananium.fr> | 2018-02-16 02:58:54 +0100 |
---|---|---|
committer | Bastien Orivel <eijebong@bananium.fr> | 2018-02-24 13:50:03 +0100 |
commit | fae2d9839fa5f8828a41402210d03092797db7ef (patch) | |
tree | db4230d9f28ffd8123517ce314be72e64723500d /components/layout_thread/lib.rs | |
parent | cccca27f4fd3d9cd5f2f5ee2853672fecc8a7b4b (diff) | |
download | servo-fae2d9839fa5f8828a41402210d03092797db7ef.tar.gz servo-fae2d9839fa5f8828a41402210d03092797db7ef.zip |
Bump rayon to 1.0
Diffstat (limited to 'components/layout_thread/lib.rs')
-rw-r--r-- | components/layout_thread/lib.rs | 11 |
1 files changed, 6 insertions, 5 deletions
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); |