Skip to main content

fret_ui/tree/debug/
layout.rs

1use super::super::*;
2
3#[derive(Debug, Clone, Default)]
4pub struct UiDebugLayoutEngineMeasureHotspot {
5    pub node: NodeId,
6    pub measure_time: Duration,
7    pub calls: u64,
8    pub cache_hits: u64,
9    pub element: Option<GlobalElementId>,
10    pub element_kind: Option<&'static str>,
11    pub top_children: Vec<UiDebugLayoutEngineMeasureChildHotspot>,
12}
13
14#[derive(Debug, Clone, Copy, Default)]
15pub struct UiDebugLayoutEngineMeasureChildHotspot {
16    pub child: NodeId,
17    pub measure_time: Duration,
18    pub calls: u64,
19    pub element: Option<GlobalElementId>,
20    pub element_kind: Option<&'static str>,
21}
22
23#[derive(Debug, Clone)]
24pub struct UiDebugLayoutEngineSolve {
25    pub root: NodeId,
26    pub root_element: Option<GlobalElementId>,
27    pub root_element_kind: Option<&'static str>,
28    pub root_element_path: Option<String>,
29    pub solve_time: Duration,
30    pub measure_calls: u64,
31    pub measure_cache_hits: u64,
32    pub measure_time: Duration,
33    pub top_measures: Vec<UiDebugLayoutEngineMeasureHotspot>,
34}
35
36#[derive(Debug, Clone)]
37pub struct UiDebugLayoutHotspot {
38    pub node: NodeId,
39    pub element: Option<GlobalElementId>,
40    pub element_kind: Option<&'static str>,
41    pub element_path: Option<String>,
42    pub widget_type: &'static str,
43    pub inclusive_time: Duration,
44    pub exclusive_time: Duration,
45}
46
47#[derive(Debug, Clone)]
48pub struct UiDebugWidgetMeasureHotspot {
49    pub node: NodeId,
50    pub element: Option<GlobalElementId>,
51    pub element_kind: Option<&'static str>,
52    pub element_path: Option<String>,
53    pub widget_type: &'static str,
54    pub inclusive_time: Duration,
55    pub exclusive_time: Duration,
56}
57
58#[derive(Debug, Clone)]
59pub struct UiDebugPaintWidgetHotspot {
60    pub node: NodeId,
61    pub element: Option<GlobalElementId>,
62    pub element_kind: Option<&'static str>,
63    pub element_path: Option<String>,
64    pub widget_type: &'static str,
65    pub inclusive_time: Duration,
66    pub exclusive_time: Duration,
67    pub inclusive_scene_ops_delta: u32,
68    pub exclusive_scene_ops_delta: u32,
69}