mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Eliminate the sequential/traversal parallel distinction in favor of a unified adaptive driver.
MozReview-Commit-ID: ADVTNJntzmp
This commit is contained in:
parent
f7c6b2f04e
commit
707ab455bb
13 changed files with 164 additions and 208 deletions
|
@ -386,14 +386,14 @@ impl fmt::Display for TraversalStatistics {
|
|||
|
||||
impl TraversalStatistics {
|
||||
/// Computes the traversal time given the start time in seconds.
|
||||
pub fn finish<E, D>(&mut self, traversal: &D, start: f64)
|
||||
pub fn finish<E, D>(&mut self, traversal: &D, parallel: bool, start: f64)
|
||||
where E: TElement,
|
||||
D: DomTraversal<E>,
|
||||
{
|
||||
let threshold = traversal.shared_context().options.style_statistics_threshold;
|
||||
let stylist = traversal.shared_context().stylist;
|
||||
|
||||
self.is_parallel = Some(traversal.is_parallel());
|
||||
self.is_parallel = Some(parallel);
|
||||
self.is_large = Some(self.elements_traversed as usize >= threshold);
|
||||
self.traversal_time_ms = (time::precise_time_s() - start) * 1000.0;
|
||||
self.selectors = stylist.num_selectors() as u32;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue