layout: Improve and expand category names for layout profiling (#37833)

This improves naming of layout categories and adds tracing for each
layout phase.

Testing: This just adds / adjusts profiling categories, so doesn't need
tests.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Martin Robinson 2025-07-02 17:02:56 +02:00 committed by GitHub
parent afdd9778e5
commit 19b5e14851
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 33 additions and 20 deletions

View file

@ -45,6 +45,7 @@ pub struct BoxTree {
}
impl BoxTree {
#[servo_tracing::instrument(name = "Box Tree Construction", skip_all)]
pub(crate) fn construct(context: &LayoutContext, root_element: ServoLayoutNode<'_>) -> Self {
let boxes = construct_for_root_element(context, root_element);
@ -191,6 +192,7 @@ fn construct_for_root_element(
}
impl BoxTree {
#[servo_tracing::instrument(name = "Fragment Tree Construction", skip_all)]
pub(crate) fn layout(
&self,
layout_context: &LayoutContext,