style: Add Gecko profiler labels for when the style threads are doing work.

Differential Revision: https://phabricator.services.mozilla.com/D30869
This commit is contained in:
Cameron McCormack 2019-05-14 05:00:45 +00:00 committed by Emilio Cobos Álvarez
parent 8dc7a25893
commit 3a22bb6c49
6 changed files with 112 additions and 0 deletions

View file

@ -277,6 +277,7 @@ pub fn traverse_nodes<'a, 'scope, E, D, I>(
top_down_dom(&work, root, traversal_data, scope, pool, traversal, tls);
} else {
scope.spawn(move |scope| {
profiler_label!(Style);
let work = work;
top_down_dom(&work, root, traversal_data, scope, pool, traversal, tls);
});
@ -286,6 +287,7 @@ pub fn traverse_nodes<'a, 'scope, E, D, I>(
let nodes: WorkUnit<E::ConcreteNode> = chunk.collect();
let traversal_data_copy = traversal_data.clone();
scope.spawn(move |scope| {
profiler_label!(Style);
let n = nodes;
top_down_dom(&*n, root, traversal_data_copy, scope, pool, traversal, tls)
});