srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/crates/wayland
diff options
context:
space:
mode:
authorsrdusr <[email protected]>2025-02-21 14:26:00 +0200
committersrdusr <[email protected]>2025-02-21 14:26:00 +0200
commitd303c276e289c9c7146cf74ccad2743246922248 (patch)
treeaf79ce8f6e3cb3a2e57b34490ffa46e588899c5f /crates/wayland
parent681a023b04b513b3283d85fe157d6b38987bc42e (diff)
downloadsrdwm-d303c276e289c9c7146cf74ccad2743246922248.tar.gz
srdwm-d303c276e289c9c7146cf74ccad2743246922248.zip
Remove resolved corner-rounding diagnostics
The top-rounds-but-bottom-doesn't investigation these were tracking is closed: live-verified via a real screenshot (pixel-level, not eyeballed) that both corners round correctly on both a decorated window and an undecorated/CSD one relying on content masking. Removes three log::debug! blocks (corner-mask state, TOP/BOTTOM border strip position dumps, and a raw alpha-byte dump of the bottom border buffer) that were firing on every single render pass regardless of whether anything changed, adding real per-frame overhead for output no longer needed. Build + clippy + test (378 passing) all still green.
Diffstat (limited to 'crates/wayland')
-rw-r--r--crates/wayland/src/state/lifecycle.rs25
-rw-r--r--crates/wayland/src/udev/render.rs29
2 files changed, 0 insertions, 54 deletions
diff --git a/crates/wayland/src/state/lifecycle.rs b/crates/wayland/src/state/lifecycle.rs
index 259979b..1de8563 100644
--- a/crates/wayland/src/state/lifecycle.rs
+++ b/crates/wayland/src/state/lifecycle.rs
@@ -211,31 +211,6 @@ impl CompState {
}
if strips[1].width > 0 && strips[1].height > 0 {
let data = decoration::render_border_bottom(strips[1].width, w.border_width, color, w.corner_radius);
- // Temporary: chasing a live report that the bottom two
- // corners render as a solid, uncurved block for the buffer's
- // own "extra" rows (0..height-thickness) while the nominal
- // rows (height-thickness..height) curve correctly. Dumps the
- // alpha byte at x=0..11 for row 0 (should already show some
- // cutting per a standalone simulation of this exact
- // algorithm) and the last nominal row, straight out of the
- // buffer this function just built - before it's wrapped
- // into a MemoryRenderBuffer at all, so this is ground truth
- // for whether `render_border_bottom` itself is the problem
- // or something downstream of it is. Remove once resolved.
- let w_usize = strips[1].width.max(1) as usize;
- let h_usize = strip_h.max(1) as usize;
- let alpha_row = |row: usize| -> Vec<u8> {
- (0..12.min(w_usize)).map(|x| data.get((row * w_usize + x) * 4 + 3).copied().unwrap_or(255)).collect()
- };
- log::debug!(
- "udev::lifecycle: BOTTOM border buffer for {} (id {id:?}): dims={w_usize}x{h_usize} row0_alpha={:?} row3_alpha={:?} row7_alpha={:?} row8_alpha={:?} row11_alpha={:?}",
- w.app_id,
- alpha_row(0),
- alpha_row(3.min(h_usize.saturating_sub(1))),
- alpha_row(7.min(h_usize.saturating_sub(1))),
- alpha_row(8.min(h_usize.saturating_sub(1))),
- alpha_row(11.min(h_usize.saturating_sub(1))),
- );
let buffer = MemoryRenderBuffer::from_slice(&data, Fourcc::Argb8888, (strips[1].width as i32, strip_h as i32), 1, Transform::Normal, None);
self.border_bottom_decorations.insert(id, buffer);
} else {
diff --git a/crates/wayland/src/udev/render.rs b/crates/wayland/src/udev/render.rs
index bbabc40..398f06e 100644
--- a/crates/wayland/src/udev/render.rs
+++ b/crates/wayland/src/udev/render.rs
@@ -361,23 +361,6 @@ impl CompState {
false
};
let border_curve_is_safe = w.decorated || content_will_be_masked;
- // Temporary: a peer session precisely measured a real
- // window's border curving correctly while its content
- // stayed hard-square (radius 0), despite both this
- // probe and the real content-render call ~200 lines
- // below passing identical arguments against the same
- // cache - logs the three inputs that decide which
- // branch each one actually takes, so a live repro
- // says definitively whether `w.decorated` is really
- // `false` here (the rule's own intent) or the mask
- // genuinely succeeds-then-somehow-doesn't-render.
- // Remove once resolved.
- log::debug!(
- "udev::render: corner-mask state for {} (id {id:?}): decorated={} content_will_be_masked={content_will_be_masked} border_curve_is_safe={border_curve_is_safe} resizing={}",
- w.app_id,
- w.decorated,
- self.wm.borrow().resizing_window() == Some(id)
- );
// Pushed *before* the titlebar band below, deliberately --
// unlike the bottom/side strips further down, this one
// isn't confined to `geometry`'s own outside: whenever
@@ -429,15 +412,6 @@ impl CompState {
let (row0, rows, shift) = decoration::border_top_visible_rows(border_curve_is_safe, w.border_width, w.corner_radius);
let pos = ((strips[0].x - origin.x) as f64, (strips[0].y - origin.y + shift as i32) as f64);
let src = Some(Rectangle::new(Point::from((0.0, row0 as f64)), Size::from((strips[0].width as f64, rows as f64))));
- // Temporary: chasing a live report that the
- // bottom two corners render square while the
- // top two curve correctly, on the same
- // window, same frame. Logs this strip's own
- // computed rows/shift/position so a live
- // repro can be compared directly against the
- // matching bottom-strip line below. Remove
- // once resolved.
- log::debug!("udev::render: TOP border strip for {} (id {id:?}): row0={row0} rows={rows} shift={shift} pos={pos:?} strip_rect={:?}", w.app_id, strips[0]);
match MemoryRenderBufferRenderElement::from_buffer(&mut udev.renderer, pos, buffer, None, src, None, Kind::Unspecified) {
Ok(elem) => custom_elements.push(crate::elements::OverlayElement::Memory(elem)),
Err(e) => log::warn!("udev: failed to import top border buffer: {e}"),
@@ -508,9 +482,6 @@ impl CompState {
let (row0, rows, shift) = decoration::border_bottom_visible_rows(border_curve_is_safe, w.border_width, w.corner_radius);
let pos = ((strips[1].x - origin.x) as f64, (strips[1].y - origin.y - shift as i32) as f64);
let src = Some(Rectangle::new(Point::from((0.0, row0 as f64)), Size::from((strips[1].width as f64, rows as f64))));
- // Temporary: see the matching TOP border log
- // above. Remove once resolved.
- log::debug!("udev::render: BOTTOM border strip for {} (id {id:?}): row0={row0} rows={rows} shift={shift} pos={pos:?} strip_rect={:?}", w.app_id, strips[1]);
match MemoryRenderBufferRenderElement::from_buffer(&mut udev.renderer, pos, buffer, None, src, None, Kind::Unspecified) {
Ok(elem) => custom_elements.push(crate::elements::OverlayElement::Memory(elem)),
Err(e) => log::warn!("udev: failed to import bottom border buffer: {e}"),