mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
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.
This commit is contained in:
parent
cc1b7acbe6
commit
49691c1638
1 changed files with 10 additions and 7 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue