Add per-widget trace spans to compose pass (#523)

This commit is contained in:
Olivier FAURE 2024-08-17 14:10:30 +02:00 committed by GitHub
parent 652ee68ae5
commit 7842fd98df
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -49,6 +49,8 @@ fn compose_widget(
parent_moved: bool, parent_moved: bool,
parent_translation: Vec2, parent_translation: Vec2,
) { ) {
let _span = widget.item.make_trace_span().entered();
let moved = parent_moved || state.item.translation_changed; let moved = parent_moved || state.item.translation_changed;
let translation = parent_translation + state.item.translation + state.item.origin.to_vec2(); let translation = parent_translation + state.item.translation + state.item.origin.to_vec2();
state.item.window_origin = translation.to_point(); state.item.window_origin = translation.to_point();