debug: Drop puffin integration
This commit is contained in:
parent
b5cbe0207f
commit
d341cb8b86
13 changed files with 7 additions and 173 deletions
82
Cargo.lock
generated
82
Cargo.lock
generated
|
|
@ -423,15 +423,6 @@ version = "0.21.7"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"
|
||||
|
||||
[[package]]
|
||||
name = "bincode"
|
||||
version = "1.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bit-set"
|
||||
version = "0.5.3"
|
||||
|
|
@ -751,7 +742,7 @@ dependencies = [
|
|||
"i18n-embed-fl",
|
||||
"iced_tiny_skia",
|
||||
"id_tree",
|
||||
"indexmap 2.1.0",
|
||||
"indexmap",
|
||||
"keyframe",
|
||||
"lazy_static",
|
||||
"libc",
|
||||
|
|
@ -762,8 +753,6 @@ dependencies = [
|
|||
"ordered-float",
|
||||
"png",
|
||||
"profiling",
|
||||
"puffin",
|
||||
"puffin_egui",
|
||||
"regex",
|
||||
"renderdoc",
|
||||
"ron",
|
||||
|
|
@ -2461,17 +2450,6 @@ version = "0.12.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "029d73f573d8e8d63e6d5020011d3255b28c3ba85d6cf870a07184ed23de9284"
|
||||
|
||||
[[package]]
|
||||
name = "indexmap"
|
||||
version = "1.9.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"hashbrown 0.12.3",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "indexmap"
|
||||
version = "2.1.0"
|
||||
|
|
@ -2971,12 +2949,6 @@ dependencies = [
|
|||
"num-traits",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lz4_flex"
|
||||
version = "0.11.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "912b45c753ff5f7f5208307e8ace7d2a2e30d024e26d3509f3dce546c044ce15"
|
||||
|
||||
[[package]]
|
||||
name = "malloc_buf"
|
||||
version = "0.0.6"
|
||||
|
|
@ -3127,7 +3099,7 @@ dependencies = [
|
|||
"bitflags 2.4.2",
|
||||
"codespan-reporting",
|
||||
"hexf-parse",
|
||||
"indexmap 2.1.0",
|
||||
"indexmap",
|
||||
"log",
|
||||
"num-traits",
|
||||
"rustc-hash",
|
||||
|
|
@ -3146,12 +3118,6 @@ dependencies = [
|
|||
"getrandom",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "natord"
|
||||
version = "1.0.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "308d96db8debc727c3fd9744aac51751243420e46edf401010908da7f8d5e57c"
|
||||
|
||||
[[package]]
|
||||
name = "ndk"
|
||||
version = "0.8.0"
|
||||
|
|
@ -3847,38 +3813,6 @@ dependencies = [
|
|||
"syn 2.0.48",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "puffin"
|
||||
version = "0.17.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "39009d69b9d547c3ffa974a20648fa02f447c05bd0a664012b1ba5a5b06fb14e"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bincode",
|
||||
"byteorder",
|
||||
"cfg-if",
|
||||
"lz4_flex",
|
||||
"once_cell",
|
||||
"parking_lot 0.12.1",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "puffin_egui"
|
||||
version = "0.23.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c5af236782d21bdd5a6eb2f8cc9a91f8d601c073b7f7d568c95c26604cc12b87"
|
||||
dependencies = [
|
||||
"egui",
|
||||
"indexmap 1.9.3",
|
||||
"natord",
|
||||
"once_cell",
|
||||
"puffin",
|
||||
"time",
|
||||
"vec1",
|
||||
"web-time",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "qoi"
|
||||
version = "0.4.1"
|
||||
|
|
@ -4495,7 +4429,7 @@ dependencies = [
|
|||
"gbm",
|
||||
"gl_generator",
|
||||
"glow 0.12.3",
|
||||
"indexmap 2.1.0",
|
||||
"indexmap",
|
||||
"input",
|
||||
"lazy_static",
|
||||
"libc",
|
||||
|
|
@ -4961,7 +4895,7 @@ version = "0.19.15"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"
|
||||
dependencies = [
|
||||
"indexmap 2.1.0",
|
||||
"indexmap",
|
||||
"toml_datetime",
|
||||
"winnow",
|
||||
]
|
||||
|
|
@ -4972,7 +4906,7 @@ version = "0.21.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03"
|
||||
dependencies = [
|
||||
"indexmap 2.1.0",
|
||||
"indexmap",
|
||||
"serde",
|
||||
"serde_spanned",
|
||||
"toml_datetime",
|
||||
|
|
@ -5325,12 +5259,6 @@ version = "0.1.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
|
||||
|
||||
[[package]]
|
||||
name = "vec1"
|
||||
version = "1.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2bda7c41ca331fe9a1c278a9e7ee055f4be7f5eb1c2b72f079b4ff8b5fce9d5c"
|
||||
|
||||
[[package]]
|
||||
name = "version_check"
|
||||
version = "0.9.4"
|
||||
|
|
|
|||
|
|
@ -35,8 +35,6 @@ log-panics = {version = "2", features = ["with-backtrace"]}
|
|||
once_cell = "1.18.0"
|
||||
ordered-float = "4.0"
|
||||
png = "0.17.5"
|
||||
puffin = {version = "0.17.0", optional = true}
|
||||
puffin_egui = {version = "0.23.0", optional = true}
|
||||
regex = "1"
|
||||
renderdoc = {version = "0.11.0", optional = true}
|
||||
ron = "0.8"
|
||||
|
|
@ -94,7 +92,7 @@ optional = true
|
|||
rev = "cdc652e0"
|
||||
|
||||
[features]
|
||||
debug = ["egui", "egui_plot", "smithay-egui", "renderdoc", "puffin", "puffin_egui", "anyhow/backtrace"]
|
||||
debug = ["egui", "egui_plot", "smithay-egui", "renderdoc", "anyhow/backtrace"]
|
||||
default = ["systemd"]
|
||||
systemd = ["libsystemd"]
|
||||
profile-with-tracy = ["profiling/profile-with-tracy"]
|
||||
|
|
|
|||
|
|
@ -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(());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
25
src/debug.rs
25
src/debug.rs
|
|
@ -27,31 +27,6 @@ pub const RENDER_COLOR: Color32 = Color32::from_rgb(29, 114, 58);
|
|||
pub const SCREENCOPY_COLOR: Color32 = Color32::from_rgb(253, 178, 39);
|
||||
pub const DISPLAY_COLOR: Color32 = Color32::from_rgb(41, 184, 209);
|
||||
|
||||
pub fn profiler_ui(
|
||||
state: &mut Common,
|
||||
renderer: &mut GlowRenderer,
|
||||
area: Rectangle<i32, Logical>,
|
||||
scale: f64,
|
||||
) -> Result<Option<TextureRenderElement<GlesTexture>>, GlesError> {
|
||||
if !state.egui.active {
|
||||
return Ok(None);
|
||||
}
|
||||
|
||||
state
|
||||
.egui
|
||||
.state
|
||||
.render(
|
||||
|ctx| {
|
||||
puffin_egui::profiler_window(ctx);
|
||||
},
|
||||
renderer,
|
||||
area,
|
||||
scale,
|
||||
0.8,
|
||||
)
|
||||
.map(Some)
|
||||
}
|
||||
|
||||
pub fn fps_ui(
|
||||
gpu: Option<&DrmNode>,
|
||||
state: &Common,
|
||||
|
|
|
|||
|
|
@ -1426,7 +1426,6 @@ impl State {
|
|||
#[cfg(feature = "debug")]
|
||||
Action::Debug => {
|
||||
self.common.egui.active = !self.common.egui.active;
|
||||
puffin::set_scopes_on(self.common.egui.active);
|
||||
for mapped in self
|
||||
.common
|
||||
.shell
|
||||
|
|
|
|||
|
|
@ -75,9 +75,6 @@ impl MoveGrabState {
|
|||
CosmicMappedRenderElement<R>: RenderElement<R>,
|
||||
I: From<CosmicMappedRenderElement<R>>,
|
||||
{
|
||||
#[cfg(feature = "debug")]
|
||||
puffin::profile_function!();
|
||||
|
||||
let scale = if self.previous == ManagedLayer::Tiling {
|
||||
0.6 + ((1.0
|
||||
- (Instant::now().duration_since(self.start).as_millis() as f64
|
||||
|
|
|
|||
|
|
@ -1097,9 +1097,6 @@ impl FloatingLayout {
|
|||
|
||||
#[profiling::function]
|
||||
pub fn refresh(&mut self) {
|
||||
#[cfg(feature = "debug")]
|
||||
puffin::profile_function!();
|
||||
|
||||
self.space.refresh();
|
||||
|
||||
if let Some(pos) = self.spawn_order.iter().position(|w| !w.alive()) {
|
||||
|
|
@ -1171,9 +1168,6 @@ impl FloatingLayout {
|
|||
CosmicWindowRenderElement<R>: RenderElement<R>,
|
||||
CosmicStackRenderElement<R>: RenderElement<R>,
|
||||
{
|
||||
#[cfg(feature = "debug")]
|
||||
puffin::profile_function!();
|
||||
|
||||
let output = self.space.outputs().next().unwrap();
|
||||
let output_geometry = {
|
||||
let layers = layer_map_for_output(output);
|
||||
|
|
|
|||
|
|
@ -2305,9 +2305,6 @@ impl TilingLayout {
|
|||
|
||||
#[profiling::function]
|
||||
pub fn refresh(&mut self) {
|
||||
#[cfg(feature = "debug")]
|
||||
puffin::profile_function!();
|
||||
|
||||
let dead_windows = self
|
||||
.mapped()
|
||||
.map(|(w, _)| w.clone())
|
||||
|
|
@ -2941,9 +2938,6 @@ impl TilingLayout {
|
|||
tree: &mut Tree<Data>,
|
||||
gaps: (i32, i32),
|
||||
) -> Option<TilingBlocker> {
|
||||
#[cfg(feature = "debug")]
|
||||
puffin::profile_function!();
|
||||
|
||||
if let Some(root_id) = tree.root_node_id() {
|
||||
let mut configures = Vec::new();
|
||||
|
||||
|
|
@ -3827,9 +3821,6 @@ impl TilingLayout {
|
|||
CosmicWindowRenderElement<R>: RenderElement<R>,
|
||||
CosmicStackRenderElement<R>: RenderElement<R>,
|
||||
{
|
||||
#[cfg(feature = "debug")]
|
||||
puffin::profile_function!();
|
||||
|
||||
let output_scale = self.output.current_scale().fractional_scale();
|
||||
|
||||
let (target_tree, duration, _) = if self.queue.animation_start.is_some() {
|
||||
|
|
|
|||
|
|
@ -1517,9 +1517,6 @@ impl Shell {
|
|||
|
||||
#[profiling::function]
|
||||
pub fn refresh(&mut self) {
|
||||
#[cfg(feature = "debug")]
|
||||
puffin::profile_function!();
|
||||
|
||||
self.popups.cleanup();
|
||||
|
||||
self.xdg_activation_state.retain_tokens(|_, data| {
|
||||
|
|
|
|||
|
|
@ -288,9 +288,6 @@ impl Workspace {
|
|||
|
||||
#[profiling::function]
|
||||
pub fn refresh(&mut self, xdg_activation_state: &XdgActivationState) {
|
||||
#[cfg(feature = "debug")]
|
||||
puffin::profile_function!();
|
||||
|
||||
// TODO: `Option::take_if` once stabilitized
|
||||
if self.fullscreen.as_ref().is_some_and(|w| !w.alive()) {
|
||||
let _ = self.fullscreen.take();
|
||||
|
|
@ -1084,9 +1081,6 @@ impl Workspace {
|
|||
CosmicStackRenderElement<R>: RenderElement<R>,
|
||||
WorkspaceRenderElement<R>: RenderElement<R>,
|
||||
{
|
||||
#[cfg(feature = "debug")]
|
||||
puffin::profile_function!();
|
||||
|
||||
let mut window_elements = Vec::new();
|
||||
let mut popup_elements = Vec::new();
|
||||
|
||||
|
|
|
|||
|
|
@ -612,9 +612,6 @@ where
|
|||
usize,
|
||||
) -> Result<RenderOutputResult, DTError<R>>,
|
||||
{
|
||||
#[cfg(feature = "debug")]
|
||||
puffin::profile_function!();
|
||||
|
||||
let mut dt = session.user_data().get::<SessionDT>().unwrap().borrow_mut();
|
||||
|
||||
let res = render_fn(
|
||||
|
|
@ -926,9 +923,6 @@ pub fn render_window_to_buffer(
|
|||
params: BufferParams,
|
||||
window: &CosmicSurface,
|
||||
) -> Result<bool, (FailureReason, anyhow::Error)> {
|
||||
#[cfg(feature = "debug")]
|
||||
puffin::profile_function!();
|
||||
|
||||
let geometry = window.geometry();
|
||||
let buffer_size = buffer_dimensions(¶ms.buffer).unwrap();
|
||||
if buffer_size != geometry.size.to_buffer(1, Transform::Normal) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue