mirror of
https://github.com/servo/servo.git
synced 2025-09-19 03:18:20 +01:00
layout: Add instrumentation for display_list
(#34128)
* Add instrumentation for display_list Signed-off-by: atbrakhi <atbrakhi@igalia.com> * review update Signed-off-by: atbrakhi <atbrakhi@igalia.com> * review fix Signed-off-by: atbrakhi <atbrakhi@igalia.com> --------- Signed-off-by: atbrakhi <atbrakhi@igalia.com>
This commit is contained in:
parent
6451767428
commit
85a9ca7cb6
3 changed files with 20 additions and 0 deletions
|
@ -65,6 +65,14 @@ pub(super) fn build_clip_path_clip_chain_if_necessary(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg_attr(
|
||||||
|
feature = "tracing",
|
||||||
|
tracing::instrument(
|
||||||
|
name = "display_list::build_simple_shape",
|
||||||
|
skip_all,
|
||||||
|
fields(servo_profiling = true)
|
||||||
|
)
|
||||||
|
)]
|
||||||
fn build_simple_shape(
|
fn build_simple_shape(
|
||||||
shape: BasicShape,
|
shape: BasicShape,
|
||||||
layout_box: LayoutRect,
|
layout_box: LayoutRect,
|
||||||
|
|
|
@ -181,6 +181,10 @@ impl DisplayList {
|
||||||
fragment_tree: &FragmentTree,
|
fragment_tree: &FragmentTree,
|
||||||
root_stacking_context: &StackingContext,
|
root_stacking_context: &StackingContext,
|
||||||
) -> (FnvHashMap<BrowsingContextId, Size2D<f32, CSSPixel>>, bool) {
|
) -> (FnvHashMap<BrowsingContextId, Size2D<f32, CSSPixel>>, bool) {
|
||||||
|
#[cfg(feature = "tracing")]
|
||||||
|
let span = tracing::span!(tracing::Level::TRACE, "display_list::build");
|
||||||
|
#[cfg(feature = "tracing")]
|
||||||
|
let _enter = span.enter();
|
||||||
let mut builder = DisplayListBuilder {
|
let mut builder = DisplayListBuilder {
|
||||||
current_scroll_node_id: self.compositor_info.root_reference_frame_id,
|
current_scroll_node_id: self.compositor_info.root_reference_frame_id,
|
||||||
current_reference_frame_scroll_node_id: self.compositor_info.root_reference_frame_id,
|
current_reference_frame_scroll_node_id: self.compositor_info.root_reference_frame_id,
|
||||||
|
|
|
@ -101,6 +101,14 @@ impl DisplayList {
|
||||||
SpatialTreeItemKey::new(pipeline_tag, self.spatial_tree_count)
|
SpatialTreeItemKey::new(pipeline_tag, self.spatial_tree_count)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg_attr(
|
||||||
|
feature = "tracing",
|
||||||
|
tracing::instrument(
|
||||||
|
name = "display_list::build_stacking_context_tree",
|
||||||
|
skip_all,
|
||||||
|
fields(servo_profiling = true)
|
||||||
|
)
|
||||||
|
)]
|
||||||
pub fn build_stacking_context_tree(
|
pub fn build_stacking_context_tree(
|
||||||
&mut self,
|
&mut self,
|
||||||
fragment_tree: &FragmentTree,
|
fragment_tree: &FragmentTree,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue