diff options
author | Ms2ger <Ms2ger@gmail.com> | 2015-11-06 13:35:38 +0100 |
---|---|---|
committer | Ms2ger <Ms2ger@gmail.com> | 2015-11-09 09:03:54 +0100 |
commit | 49691c1638efd1437edc6aa12a7afd53c0018c20 (patch) | |
tree | 259bb1859ab77e4a8c066ffdb9c02346c9dcc273 /components | |
parent | cc1b7acbe64a10c4d2f181f7989e68eda3fc0db9 (diff) | |
download | servo-49691c1638efd1437edc6aa12a7afd53c0018c20.tar.gz servo-49691c1638efd1437edc6aa12a7afd53c0018c20.zip |
Make LayoutTask::solve_constraints_parallel a static method.
This matches LayoutTask::solve_constraints, and will be necessary when we
borrow parallel_traversal directly from the LayoutTask.
Diffstat (limited to 'components')
-rw-r--r-- | components/layout/layout_task.rs | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/components/layout/layout_task.rs b/components/layout/layout_task.rs index ca755bfac02..2efed666b25 100644 --- a/components/layout/layout_task.rs +++ b/components/layout/layout_task.rs @@ -819,17 +819,18 @@ impl LayoutTask { /// This corresponds to `Reflow()` in Gecko and `layout()` in WebKit/Blink and should be /// benchmarked against those two. It is marked `#[inline(never)]` to aid profiling. #[inline(never)] - fn solve_constraints_parallel(&self, - traversal: &mut WorkQueue<SharedLayoutContext, WorkQueueData>, + fn solve_constraints_parallel(traversal: &mut WorkQueue<SharedLayoutContext, WorkQueueData>, layout_root: &mut FlowRef, + profiler_metadata: Option<TimerMetadata>, + time_profiler_chan: time::ProfilerChan, shared_layout_context: &SharedLayoutContext) { let _scope = layout_debug_scope!("solve_constraints_parallel"); // NOTE: this currently computes borders, so any pruning should separate that // operation out. parallel::traverse_flow_tree_preorder(layout_root, - self.profiler_metadata(), - self.time_profiler_chan.clone(), + profiler_metadata, + time_profiler_chan, shared_layout_context, traversal); } @@ -1385,9 +1386,11 @@ impl LayoutTask { } Some(ref mut parallel) => { // Parallel mode. - self.solve_constraints_parallel(parallel, - &mut root_flow, - &*layout_context); + LayoutTask::solve_constraints_parallel(parallel, + &mut root_flow, + self.profiler_metadata(), + self.time_profiler_chan.clone(), + &*layout_context); } } }); |