debug: Drop puffin integration

This commit is contained in:
Victoria Brekenfeld 2024-03-21 17:49:06 +01:00
parent b5cbe0207f
commit d341cb8b86
13 changed files with 7 additions and 173 deletions

View file

@ -1162,9 +1162,6 @@ impl Surface {
state: &mut Common,
screencopy: Option<&[(ScreencopySession, BufferParams)]>,
) -> Result<()> {
#[cfg(feature = "debug")]
puffin::profile_function!();
if self.surface.is_none() {
return Ok(());
}

View file

@ -195,9 +195,6 @@ where
R: Renderer + ImportAll,
<R as Renderer>::TextureId: 'static,
{
#[cfg(feature = "debug")]
puffin::profile_function!();
if get_role(&surface) != Some("dnd_icon") {
warn!(
?surface,
@ -315,8 +312,6 @@ where
R: Renderer + ImportMem + ImportAll,
<R as Renderer>::TextureId: Clone + 'static,
{
#[cfg(feature = "debug")]
puffin::profile_function!();
// draw the cursor as relevant
// reset the cursor if the surface is no longer alive
let cursor_status = seat

View file

@ -9,7 +9,7 @@ use std::{
};
#[cfg(feature = "debug")]
use crate::debug::{fps_ui, profiler_ui};
use crate::debug::fps_ui;
use crate::{
shell::{
focus::target::WindowGroup,
@ -402,9 +402,6 @@ where
CosmicMappedRenderElement<R>: RenderElement<R>,
E: From<CursorRenderElement<R>> + From<CosmicMappedRenderElement<R>>,
{
#[cfg(feature = "debug")]
puffin::profile_function!();
let scale = output.current_scale().fractional_scale();
let mut elements = Vec::new();
@ -484,9 +481,6 @@ where
CosmicMappedRenderElement<R>: RenderElement<R>,
WorkspaceRenderElement<R>: RenderElement<R>,
{
#[cfg(feature = "debug")]
puffin::profile_function!();
let mut elements = cursor_elements(renderer, state, output, cursor_mode);
#[cfg(feature = "debug")]
@ -510,20 +504,6 @@ where
.map_err(RenderError::Rendering)?;
elements.push(fps_overlay.into());
}
if state.shell.outputs().next() == Some(output) {
if let Some(profiler_overlay) = profiler_ui(
state,
renderer.glow_renderer_mut(),
Rectangle::from_loc_and_size((0, 0), output_geo.size).as_logical(),
scale,
)
.map_err(<R as Renderer>::Error::from)
.map_err(RenderError::Rendering)?
{
elements.push(profiler_overlay.into());
}
}
}
// If session locked, only show session lock surfaces
@ -1056,9 +1036,6 @@ where
WorkspaceRenderElement<R>: RenderElement<R>,
Source: Clone,
{
#[cfg(feature = "debug")]
puffin::profile_function!();
if let Some(ref mut fps) = fps {
fps.start();
#[cfg(feature = "debug")]
@ -1176,8 +1153,6 @@ where
std::ptr::null(),
);
}
puffin::GlobalProfiler::lock().new_frame();
}
res