debug: More profiling annotations
This commit is contained in:
parent
465813c1c5
commit
a65e1d6b5f
8 changed files with 20 additions and 0 deletions
|
|
@ -725,6 +725,7 @@ impl SurfaceThreadState {
|
|||
//self.software_api.as_mut().remove_node(node);
|
||||
}
|
||||
|
||||
#[profiling::function]
|
||||
fn on_vblank(&mut self, metadata: Option<DrmEventMetadata>) {
|
||||
let Some(compositor) = self.compositor.as_mut() else {
|
||||
return;
|
||||
|
|
@ -851,6 +852,7 @@ impl SurfaceThreadState {
|
|||
}
|
||||
}
|
||||
|
||||
#[profiling::function]
|
||||
fn on_estimated_vblank(&mut self, force: bool) {
|
||||
match mem::replace(&mut self.state, QueueState::Idle) {
|
||||
QueueState::Idle => unreachable!(),
|
||||
|
|
@ -949,6 +951,7 @@ impl SurfaceThreadState {
|
|||
}
|
||||
}
|
||||
|
||||
#[profiling::function]
|
||||
fn redraw(&mut self, estimated_presentation: Duration) -> Result<()> {
|
||||
let Some(compositor) = self.compositor.as_mut() else {
|
||||
return Ok(());
|
||||
|
|
@ -1826,6 +1829,7 @@ fn source_node_for_surface(w: &WlSurface) -> Option<DrmNode> {
|
|||
|
||||
// TODO: Introduce can_shared_dmabuf_framebuffer for cases where we might select another gpu
|
||||
// and composite on target if not possible to finally get rid of "primary"
|
||||
#[profiling::function]
|
||||
fn render_node_for_output(
|
||||
output: &Output,
|
||||
primary_node: &DrmNode,
|
||||
|
|
|
|||
|
|
@ -122,6 +122,7 @@ impl State {
|
|||
}
|
||||
}
|
||||
|
||||
#[profiling::function]
|
||||
pub fn handle_shortcut_action(
|
||||
&mut self,
|
||||
action: shortcuts::Action,
|
||||
|
|
|
|||
|
|
@ -161,6 +161,7 @@ impl ModifiersShortcutQueue {
|
|||
}
|
||||
|
||||
impl State {
|
||||
#[profiling::function]
|
||||
pub fn process_input_event<B: InputBackend>(&mut self, event: InputEvent<B>)
|
||||
where
|
||||
<B as InputBackend>::Device: 'static,
|
||||
|
|
@ -1504,6 +1505,7 @@ impl State {
|
|||
}
|
||||
|
||||
/// Determine is key event should be intercepted as a key binding, or forwarded to surface
|
||||
#[profiling::function]
|
||||
pub fn filter_keyboard_input<B: InputBackend, E: KeyboardKeyEvent<B>>(
|
||||
&mut self,
|
||||
event: &E,
|
||||
|
|
@ -1958,6 +1960,7 @@ impl State {
|
|||
}
|
||||
}
|
||||
|
||||
#[profiling::function]
|
||||
pub fn element_under(
|
||||
global_pos: Point<f64, Global>,
|
||||
output: &Output,
|
||||
|
|
@ -2084,6 +2087,7 @@ impl State {
|
|||
.flatten()
|
||||
}
|
||||
|
||||
#[profiling::function]
|
||||
pub fn surface_under(
|
||||
global_pos: Point<f64, Global>,
|
||||
output: &Output,
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ impl Shell {
|
|||
/// Set the keyboard focus to the given target
|
||||
/// Note: `update_cursor` is used to determine whether to update the pointer location if cursor_follows_focus is enabled
|
||||
/// if the focus change was due to a pointer event, this should be set to false
|
||||
#[profiling::function]
|
||||
pub fn set_focus(
|
||||
state: &mut State,
|
||||
target: Option<&KeyboardFocusTarget>,
|
||||
|
|
@ -224,6 +225,7 @@ impl Shell {
|
|||
}
|
||||
|
||||
/// Internal, used to ensure that ActiveFocus, KeyboardFocusTarget, and FocusedOutput are all in sync
|
||||
#[profiling::function]
|
||||
fn update_focus_state(
|
||||
seat: &Seat<State>,
|
||||
target: Option<&KeyboardFocusTarget>,
|
||||
|
|
@ -327,6 +329,7 @@ fn raise_with_children(floating_layer: &mut FloatingLayout, focused: &CosmicMapp
|
|||
}
|
||||
|
||||
impl Common {
|
||||
#[profiling::function]
|
||||
pub fn refresh_focus(state: &mut State) {
|
||||
let seats = state
|
||||
.common
|
||||
|
|
|
|||
|
|
@ -1408,6 +1408,7 @@ impl Common {
|
|||
self.idle_notifier_state.set_is_inhibited(is_inhibited);
|
||||
}
|
||||
|
||||
#[profiling::function]
|
||||
pub fn on_commit(&mut self, surface: &WlSurface) {
|
||||
{
|
||||
let shell = self.shell.read();
|
||||
|
|
|
|||
|
|
@ -695,6 +695,7 @@ fn primary_scanout_output_compare<'a>(
|
|||
}
|
||||
|
||||
impl Common {
|
||||
#[profiling::function]
|
||||
pub fn update_primary_output(
|
||||
&self,
|
||||
output: &Output,
|
||||
|
|
@ -796,6 +797,7 @@ impl Common {
|
|||
}
|
||||
}
|
||||
|
||||
#[profiling::function]
|
||||
pub fn send_dmabuf_feedback(
|
||||
&self,
|
||||
output: &Output,
|
||||
|
|
@ -946,6 +948,7 @@ impl Common {
|
|||
}
|
||||
}
|
||||
|
||||
#[profiling::function]
|
||||
pub fn send_frames(&self, output: &Output, sequence: Option<usize>) {
|
||||
let time = self.clock.now();
|
||||
let should_send = |surface: &WlSurface, states: &SurfaceData| {
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ impl OverlapNotifyState {
|
|||
self.global.clone()
|
||||
}
|
||||
|
||||
#[profiling::function]
|
||||
pub fn refresh<D, W>(state: &mut D)
|
||||
where
|
||||
D: GlobalDispatch<ZcosmicOverlapNotifyV1, OverlapNotifyGlobalData>
|
||||
|
|
|
|||
|
|
@ -317,6 +317,7 @@ impl Common {
|
|||
}
|
||||
}
|
||||
|
||||
#[profiling::function]
|
||||
pub fn xwayland_notify_key_event(
|
||||
&mut self,
|
||||
sym: Keysym,
|
||||
|
|
@ -400,6 +401,7 @@ impl Common {
|
|||
}
|
||||
}
|
||||
|
||||
#[profiling::function]
|
||||
pub fn xwayland_notify_pointer_button_event(
|
||||
&mut self,
|
||||
button: u32,
|
||||
|
|
@ -449,6 +451,7 @@ impl Common {
|
|||
}
|
||||
}
|
||||
|
||||
#[profiling::function]
|
||||
pub fn update_x11_stacking_order(&mut self) {
|
||||
let shell = self.shell.read();
|
||||
let active_output = shell.seats.last_active().active_output();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue