Skip to content

RediWM is a Wayland compositor written in Zig (OpenGL ES) that includes everything in one process

added theme packs support

oxydizerfd38593d051c
diff --git a/AGENTS.md b/AGENTS.md
index 0b1793b..5390083 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -150,6 +150,14 @@ the one for the directory you work in: `src/files`, `src/editor`,
`forcedGeometry()`). `Toplevel.layout()` reads the `maximized` field, not
`isMaximized()` (xdg acks later). Leaving a layout without moving goes
through `leaveLayout()`.
+* **Tiles glide and workspaces slide.** `setAutoTile(rect, animate)` eases
+ like snapping (`auto_tiling.Manager.quiet` for non-user reflows). A switch
+ keeps the leaving workspace's frames shown but inert
+ (`rediwm_projection_set_tree_inert`) until `tickSwitch` settles; anything
+ that stops showing a window mid-slide calls `finishSwitch`. Input follows
+ what is drawn and `chrome_box` sizes are animated: tests
+ `wait_for("window_geometry_settled")` before pointer input or geometry
+ snapshots.
* **`Backend.shell` windows** (Settings) paint into `scene_tree` and present
with `presentOwned`. No wl_surface: focused = first in `world.toplevels`,
activated, no seat focus (`hasKeyboardFocus`). Never close one from a
diff --git a/README.md b/README.md
index eacdbc3..2313d6e 100644
--- a/README.md
+++ b/README.md
@@ -45,7 +45,7 @@ Installing never replaces your login manager
Requirements: Zig 0.16, wlroots 0.20, and the development files for Wayland,
wayland-protocols, xkbcommon, pixman, FreeType, HarfBuzz, Fontconfig,
librsvg/GdkPixbuf, PangoCairo, libinput, PAM, libpulse, libpipewire-0.3, Poppler GLib,
-libseccomp, libjpeg and libpng. Optional:
+libseccomp, libarchive, libjpeg, libpng, libwebp and libXcursor. Optional:
Xwayland, `foot`, `brightnessctl`, `gio`/`xdg-open`, `git` (optional).
Run from a checkout, `scripts/install.sh` builds that checkout (dependencies,
@@ -124,8 +124,14 @@ and `[keybinds.workspace]`. Their action names are `toggle_floating`,
IPC uses the same actions: `tiling_action` takes an `action` string and an
optional window `id`; without `id`, it uses the focused window/current workspace.
-New workspace windows use a recursive split layout, with an 8 px gap around
-and between frames by default. Set `[compositor] window_gap` to override it,
+New workspace windows use a recursive split layout: a new window splits the
+focused tile along its longer side, and a window moved to another workspace
+joins beside that workspace's focused tile. Tiles glide to their new places, and
+switching workspaces slides the old one out and the new one in (the higher
+number from the right, or from below when other displays sit beside the output;
+a cross-fade when displays surround it or motion is reduced) at
+`[compositor] desktop_switch_ms`. There is an 8 px gap around and between
+frames by default. Set `[compositor] window_gap` to override it,
including `0` for no gap; Canvas keeps its default gap of 0 px. Existing explicit
gap settings are preserved. The active workspace window has a 1 px red outline,
including floating windows and clients that draw their own decorations;
@@ -306,3 +312,5 @@ terms or conditions.
Bundled third-party assets keep their own licenses: the fonts under
`assets/fonts` (SIL OFL 1.1) and the cursors under `assets/cursors` (CC BY-SA 4.0).
+
+Theme packs are selected in Settings → Appearance. Packs can include wallpapers, shell glyphs, file/app icons and cursors. See [theme packs](docs/themes.md) for the format, installation and sharing.
diff --git a/TESTING.md b/TESTING.md
index 21d16ae..d399eb5 100644
--- a/TESTING.md
+++ b/TESTING.md
@@ -116,6 +116,7 @@ saved canvas state and multi-window layout undo, both sides of tiled/floating
output transfers, dialog transfers, closed-member reconciliation, late configure
replies, keyboard/IPC tiling controls, drag previews and Escape, live
split resizing, unmap/remap, placeholder replacement, automatic split geometry,
+new windows splitting the focused tile, hidden input while a workspace slides out,
constraints/overflow, stable focus,
minimize/maximize/fullscreen reinsertion, manual placement, workspace membership,
hidden input, dialog transfers, Settings, workspace protocol activation,
@@ -384,3 +385,5 @@ Keyring unlock and browser/OBS sharing remain unverified. See
[desktop readiness](desktop-readiness.md) for review results and known baseline
failures, and [screen sharing](docs/screen-sharing.md#remaining-qualification)
for the remaining capture acceptance checks.
+
+`python3 tests/theme_packs.py` covers theme ZIP installation, refusal of unsafe paths/links/special files/bombs, pack discovery, base plus overrides, live wallpaper and folder icons, reset, cursors and removal in isolated data/config/state directories.
diff --git a/assets/themes/redi-blue.toml b/assets/themes/redi-blue.toml
index 1fb1216..94816f0 100644
--- a/assets/themes/redi-blue.toml
+++ b/assets/themes/redi-blue.toml
@@ -1,3 +1,8 @@
+[meta]
+format = 1
+id = "redi-blue"
+name = "Redi Blue"
+
[theme]
# Window chrome
window_bg = "rgba(14,19,28,0.46)"
@@ -97,3 +102,7 @@ switcher_selection_radius = 4
calendar_radius = 4
osd_radius = 4
start_button_radius = 4
+
+[assets]
+color_scheme = "dark"
+wallpaper = "wallpaper-blue.png"
diff --git a/assets/themes/rediwm-dark.toml b/assets/themes/rediwm-dark.toml
index 6e6105e..3676fd4 100644
--- a/assets/themes/rediwm-dark.toml
+++ b/assets/themes/rediwm-dark.toml
@@ -1,3 +1,8 @@
+[meta]
+format = 1
+id = "rediwm-dark"
+name = "RediWM Dark"
+
[theme]
font = "Manrope"
mono_font = "JetBrains Mono"
@@ -75,3 +80,6 @@ start_menu_search_bg = "rgba(21,26,31,1.000)"
start_menu_selected_bg = "rgba(255,255,255,0.045)"
start_menu_selected_border = "rgba(237,27,46,0.350)"
start_menu_selected_marker = "rgba(237,27,46,1.000)"
+
+[assets]
+color_scheme = "dark"
diff --git a/assets/themes/rediwm-light.toml b/assets/themes/rediwm-light.toml
index c05acc7..6bf1fb1 100644
--- a/assets/themes/rediwm-light.toml
+++ b/assets/themes/rediwm-light.toml
@@ -1,3 +1,8 @@
+[meta]
+format = 1
+id = "rediwm-light"
+name = "RediWM Light"
+
[theme]
font = "Manrope"
mono_font = "JetBrains Mono"
@@ -119,3 +124,6 @@ start_button_logo_color = "#1F2430"
file_broken = "#168579"
battery_critical = "#168579"
desktop_notice_bg = "rgba(8,42,36,0.95)"
+
+[assets]
+color_scheme = "light"
diff --git a/assets/wallpapers/wallpaper-blue.png b/assets/wallpapers/wallpaper-blue.png
new file mode 100644
index 0000000..ed9e1c0
Binary files /dev/null and b/assets/wallpapers/wallpaper-blue.png differ
diff --git a/build.zig b/build.zig
index dde7bf7..f2c3ff0 100644
--- a/build.zig
+++ b/build.zig
@@ -93,6 +93,23 @@ pub fn build(b: *std.Build) void {
config_mod.addImport("xkbcommon", xkbcommon);
config_mod.linkSystemLibrary("xkbcommon", .{});
+ const theme_helper = b.addExecutable(.{
+ .name = "rediwm-theme",
+ .root_module = b.createModule(.{ .root_source_file = b.path("src/theme_main.zig"), .target = target, .optimize = optimize, .link_libc = true }),
+ .use_llvm = use_llvm,
+ .use_lld = use_llvm,
+ });
+ theme_helper.root_module.addImport("config", config_mod);
+ theme_helper.root_module.addImport("ui", ui_mod);
+ theme_helper.root_module.addCSourceFile(.{ .file = b.path("src/theme_helper/native.c"), .flags = &.{ "-std=c11", "-Wall", "-Wextra", "-Werror" } });
+ inline for (.{ "libarchive", "librsvg-2.0", "gdk-pixbuf-2.0" }) |lib| theme_helper.root_module.linkSystemLibrary(lib, .{});
+ addThumbCodec(b, theme_helper.root_module);
+ theme_helper.root_module.linkSystemLibrary("libwebp", .{});
+ theme_helper.root_module.linkSystemLibrary("xcursor", .{});
+ b.installArtifact(theme_helper);
+ b.getInstallStep().dependOn(&b.addInstallFileWithDir(b.path("data/rediwm-theme.desktop"), .prefix, "share/applications/rediwm-theme.desktop").step);
+ b.getInstallStep().dependOn(&b.addInstallFileWithDir(b.path("data/rediwm-theme.xml"), .prefix, "share/mime/packages/rediwm-theme.xml").step);
+
const protocol_mod = b.createModule(.{
.root_source_file = b.path("src/ipc/protocol.zig"),
.target = target,
diff --git a/data/rediwm-theme.desktop b/data/rediwm-theme.desktop
new file mode 100644
index 0000000..555db3f
--- /dev/null
+++ b/data/rediwm-theme.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Type=Application
+Name=Install theme
+Comment=Validate and install a RediWM theme pack
+Exec=rediwm-theme install %f
+MimeType=application/x-rediwm-theme;
+Icon=preferences-desktop-theme
+Terminal=false
+NoDisplay=true
+Categories=Settings;DesktopSettings;
diff --git a/data/rediwm-theme.xml b/data/rediwm-theme.xml
new file mode 100644
index 0000000..aae1198
--- /dev/null
+++ b/data/rediwm-theme.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
+ <mime-type type="application/x-rediwm-theme">
+ <comment>RediWM theme pack</comment>
+ <sub-class-of type="application/zip"/>
+ <glob pattern="*.rediwm-theme"/>
+ </mime-type>
+</mime-info>
diff --git a/docs/plans/scene-graph-baseline.md b/docs/plans/scene-graph-baseline.md
deleted file mode 100644
index de03469..0000000
--- a/docs/plans/scene-graph-baseline.md
+++ /dev/null
@@ -1,360 +0,0 @@
-# Scene graph plan, stage 0: baseline and inventory
-
-Status: stage 0 of [scene-graph.md](scene-graph.md). Recorded 2026-10-08/09 on
-`9e28bd4` (ReleaseSafe) with wlroots 0.20.2 (the pinned release). No behaviour changed; the
-only code added is the measurement harness and a small test-client extension.
-
-Contents: [Baseline](#baseline) · [Findings](#findings) ·
-[`wlr_scene_output` inventory](#what-wlr_scene_output-does-today) ·
-[GLES2 shader inventory](#what-wlroots-gles2-draws) ·
-[Decisions](#policy-and-renderer-decisions)
-
-## Baseline
-
-### Harness
-
-`tests/scene_baseline.py` runs a fixed workload in a headless GLES2 compositor
-and writes one JSON file; `--capture DIR` also keeps golden screenshots.
-
-```sh
-umask 077
-export WLR_RENDER_DRM_DEVICE=/dev/dri/renderD128 # the iGPU on a multi-GPU machine
-export XDG_STATE_HOME=$(mktemp -d)
-python3 tests/scene_baseline.py --out head.json --capture golden/
-python3 tests/scene_baseline.py --binary new/rediwm --out new.json --compare golden/
-python3 tests/scene_baseline.py --report new.json --against head.json
-```
-
-Workload per scale configuration (`scale1`, `scale1.5`, `mixed` = a scale 1
-and a scale 1.5 output, `mixed_noglass` = the same with `REDIWM_NO_GLASS=1`):
-three overlapping fixture windows on a banded wallpaper with the default
-(translucent, glass) theme, animations off, then
-
-| Scenario | What runs |
-|---|---|
-| `idle` | Three static windows, 5 s. |
-| `spinner_clear` | Window C repaints a 16×16 rectangle at 60 fps, clear of any glass. |
-| `spinner_glass` | The same rectangle under window B's titlebar glass. |
-| `damage_full` | C repaints its whole surface at 60 fps (as `tests/perf.py`). |
-| `drag` | Window A dragged by its titlebar, 120 Hz pointer; in `mixed` across both outputs. |
-| `resize` | Window B resized by `set_window_size` at 60 Hz. |
-| `fullscreen` | C, 60 fps full damage, fullscreen. |
-| `zoom_85`, `zoom_70`, `zoom_55` | Camera zoom levels with the glass spinner running. |
-| `zoom_min_hold` | A held pinch at `camera_zoom_min` (release snaps back to a level). |
-
-Two sessions per configuration: **clean** never calls the performance IPC and
-records, from `/proc` and `perf stat` on the compositor process, CPU (summed
-per-thread schedstat), instructions:u, voluntary and involuntary context
-switches per second (by thread) and RSS; **stats** records the frame timers
-(`cpu_frame`, `projection_cpu`, `glass_cpu`, `scene_commit_cpu`, `gpu_elapsed`,
-chrome, taskbar and panel time), output commits and skipped commits. The first
-performance call turns on the GPU timer (about 0.17 ms per frame), so process
-figures are only comparable within a mode. The process is pinned to eight
-P-core threads; compare runs from the same machine, interleaved.
-
-Golden screenshots (`windows`, `fullscreen`, `zoom70`, `zoom_min`, per output)
-are full-output IPC screenshots with the taskbar (a clock) masked on compare.
-The compositor gets an uncreatable state directory so the layout autosave
-cannot move windows mid-scenario (finding 10), and clients are placed and
-fullscreened with explicit waits for position and buffer size.
-
-### Results
-
-`9e28bd4` ReleaseSafe (`rediwm`, 26.8 MB), 12th Gen Intel(R) Core(TM) i9-12900H, kernel 7.2.8-zen1-2-zen, GLES2 on the iGPU, pinned to P-core threads 2-9, AC power, platform profile `performance`, governor `schedutil`, EPP `performance`, 4 s per scenario (idle 5 s). Raw data: `docs/plans/scene-graph-baseline/head-9e28bd4.json`.
-
-CPU % is of one core, summed over all compositor threads. Frame columns are mean ms per presented frame from the stats session (GPU timer on). *Commits* is presented output commits in the scenario (both outputs in `mixed`). Wakeups are voluntary context switches per second. Top thread: busiest thread by CPU.
-
-#### Scale 1
-
-| Scenario | CPU % | Minstr/s | wakeups/s | RSS MiB | commits | cpu_frame | projection | glass | scene commit | gpu | top thread |
-|---|--:|--:|--:|--:|--:|--:|--:|--:|--:|--:|---|
-| `idle` | 0.00 | 0.0 | 1 | 130 | 0 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | rediwm 0.0% |
-| `spinner_clear` | 4.57 | 37.8 | 193 | 130 | 245 | 0.295 | 0.023 | 0.019 | 0.135 | 0.105 | rediwm 4.6% |
-| `spinner_glass` | 5.55 | 68.4 | 191 | 130 | 242 | 0.482 | 0.021 | 0.228 | 0.127 | 0.339 | rediwm 5.6% |
-| `damage_full` | 8.85 | 89.1 | 700 | 130 | 242 | 0.522 | 0.022 | 0.243 | 0.151 | 0.417 | rediwm 8.8% |
-| `drag` | 3.70 | 74.7 | 172 | 131 | 242 | 0.611 | 0.056 | 0.250 | 0.186 | 0.536 | rediwm 3.7% |
-| `resize` | 14.52 | 312.9 | 348 | 131 | 233 | 1.186 | 0.244 | 0.596 | 0.243 | 0.959 | rediwm 14.5% |
-| `fullscreen` | 41.91 | 60.9 | 127 | 134 | 231 | 0.361 | 0.024 | 0.008 | 0.234 | 0.549 | rediwm 41.9% |
-| `zoom_85` | 5.88 | 66.0 | 195 | 134 | 242 | 0.538 | 0.023 | 0.258 | 0.135 | 0.376 | rediwm 5.9% |
-| `zoom_70` | 5.74 | 68.6 | 191 | 135 | 242 | 0.525 | 0.023 | 0.250 | 0.137 | 0.362 | rediwm 5.7% |
-| `zoom_55` | 6.33 | 66.0 | 191 | 135 | 242 | 0.512 | 0.022 | 0.245 | 0.130 | 0.349 | rediwm 6.3% |
-| `zoom_min_hold` | 4.93 | 38.8 | 193 | 135 | 246 | 0.312 | 0.022 | 0.006 | 0.152 | 0.119 | rediwm 4.9% |
-
-#### Scale 1.5
-
-| Scenario | CPU % | Minstr/s | wakeups/s | RSS MiB | commits | cpu_frame | projection | glass | scene commit | gpu | top thread |
-|---|--:|--:|--:|--:|--:|--:|--:|--:|--:|--:|---|
-| `idle` | 0.01 | 0.0 | 1 | 134 | 0 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | rediwm 0.0% |
-| `spinner_clear` | 4.19 | 40.0 | 193 | 135 | 245 | 0.335 | 0.027 | 0.020 | 0.153 | 0.136 | rediwm 4.2% |
-| `spinner_glass` | 6.86 | 71.1 | 189 | 135 | 244 | 0.395 | 0.017 | 0.184 | 0.106 | 0.304 | rediwm 6.9% |
-| `damage_full` | 9.52 | 95.6 | 696 | 135 | 242 | 0.503 | 0.020 | 0.220 | 0.164 | 0.446 | rediwm 9.5% |
-| `drag` | 3.68 | 78.3 | 172 | 135 | 242 | 0.673 | 0.063 | 0.266 | 0.218 | 0.651 | rediwm 3.7% |
-| `resize` | 15.62 | 489.6 | 340 | 135 | 232 | 1.183 | 0.236 | 0.591 | 0.264 | 1.089 | rediwm 15.6% |
-| `fullscreen` | 33.38 | 64.4 | 154 | 143 | 230 | 0.419 | 0.026 | 0.010 | 0.280 | 0.899 | rediwm 33.4% |
-| `zoom_85` | 6.34 | 69.4 | 191 | 143 | 242 | 0.479 | 0.020 | 0.223 | 0.131 | 0.353 | rediwm 6.3% |
-| `zoom_70` | 6.60 | 71.3 | 193 | 143 | 243 | 0.433 | 0.020 | 0.200 | 0.117 | 0.305 | rediwm 6.6% |
-| `zoom_55` | 6.79 | 69.6 | 190 | 143 | 242 | 0.511 | 0.021 | 0.237 | 0.135 | 0.358 | rediwm 6.8% |
-| `zoom_min_hold` | 5.17 | 40.9 | 192 | 143 | 246 | 0.290 | 0.021 | 0.005 | 0.144 | 0.114 | rediwm 5.2% |
-
-#### Mixed scales (1 and 1.5), glass on
-
-| Scenario | CPU % | Minstr/s | wakeups/s | RSS MiB | commits | cpu_frame | projection | glass | scene commit | gpu | top thread |
-|---|--:|--:|--:|--:|--:|--:|--:|--:|--:|--:|---|
-| `idle` | 8.91 | 215.6 | 71 | 133 | 594 | 0.687 | 0.012 | 0.454 | 0.141 | 0.905 | rediwm 8.9% |
-| `spinner_clear` | 11.88 | 236.9 | 194 | 138 | 473 | 0.791 | 0.017 | 0.524 | 0.164 | 0.959 | rediwm 11.9% |
-| `spinner_glass` | 11.02 | 238.6 | 193 | 138 | 475 | 0.758 | 0.016 | 0.502 | 0.159 | 0.888 | rediwm 11.0% |
-| `damage_full` | 15.90 | 256.7 | 690 | 138 | 474 | 0.747 | 0.016 | 0.493 | 0.159 | 0.912 | rediwm 15.9% |
-| `drag` | 10.25 | 249.3 | 173 | 138 | 494 | 0.897 | 0.039 | 0.575 | 0.188 | 0.976 | rediwm 10.2% |
-| `resize` | 22.45 | 650.5 | 342 | 138 | 454 | 1.128 | 0.130 | 0.716 | 0.204 | 1.284 | rediwm 22.4% |
-| `fullscreen` | 35.18 | 159.6 | 152 | 143 | 459 | 0.617 | 0.020 | 0.351 | 0.163 | 0.766 | rediwm 35.2% |
-| `zoom_85` | 12.79 | 235.4 | 193 | 143 | 470 | 0.914 | 0.020 | 0.603 | 0.188 | 0.971 | rediwm 12.8% |
-| `zoom_70` | 11.63 | 236.1 | 193 | 143 | 470 | 0.945 | 0.019 | 0.624 | 0.201 | 0.974 | rediwm 11.6% |
-| `zoom_55` | 13.14 | 225.7 | 191 | 143 | 474 | 0.695 | 0.016 | 0.463 | 0.138 | 0.894 | rediwm 13.1% |
-| `zoom_min_hold` | 12.63 | 230.5 | 192 | 143 | 476 | 0.673 | 0.013 | 0.445 | 0.137 | 0.771 | rediwm 12.6% |
-
-#### Mixed scales (1 and 1.5), `REDIWM_NO_GLASS=1`
-
-| Scenario | CPU % | Minstr/s | wakeups/s | RSS MiB | commits | cpu_frame | projection | glass | scene commit | gpu | top thread |
-|---|--:|--:|--:|--:|--:|--:|--:|--:|--:|--:|---|
-| `idle` | 0.01 | 0.0 | 1 | 131 | 0 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | rediwm 0.0% |
-| `spinner_clear` | 4.66 | 37.1 | 252 | 136 | 246 | 0.184 | 0.017 | 0.000 | 0.068 | 0.055 | rediwm 4.7% |
-| `spinner_glass` | 5.84 | 38.9 | 248 | 136 | 245 | 0.210 | 0.018 | 0.000 | 0.086 | 0.072 | rediwm 5.8% |
-| `damage_full` | 9.53 | 63.4 | 748 | 136 | 246 | 0.172 | 0.014 | 0.000 | 0.079 | 0.081 | rediwm 9.5% |
-| `drag` | 3.65 | 59.2 | 209 | 136 | 496 | 0.208 | 0.033 | 0.000 | 0.097 | 0.124 | rediwm 3.6% |
-| `resize` | 16.89 | 459.9 | 358 | 136 | 480 | 0.378 | 0.131 | 0.000 | 0.180 | 0.222 | rediwm 16.9% |
-| `fullscreen` | 43.90 | 57.9 | 121 | 140 | 464 | 0.210 | 0.016 | 0.000 | 0.126 | 0.255 | rediwm 43.9% |
-| `zoom_85` | 5.06 | 39.8 | 250 | 140 | 260 | 0.126 | 0.010 | 0.000 | 0.052 | 0.035 | rediwm 5.1% |
-| `zoom_70` | 5.50 | 41.8 | 250 | 141 | 247 | 0.143 | 0.012 | 0.000 | 0.059 | 0.042 | rediwm 5.5% |
-| `zoom_55` | 5.18 | 42.2 | 249 | 141 | 245 | 0.208 | 0.018 | 0.000 | 0.085 | 0.080 | rediwm 5.2% |
-| `zoom_min_hold` | 6.46 | 40.6 | 252 | 141 | 256 | 0.139 | 0.011 | 0.000 | 0.054 | 0.038 | rediwm 6.5% |
-
-### Run-to-run noise
-
-The same binary, twice in a row on the same session of the machine (scenario-level, clean and stats sessions together). Treat differences below the *90th percentile* as noise.
-
-| Metric | median |Δ| | p90 |Δ| | max |Δ| | n |
-|---|--:|--:|--:|--:|
-| CPU % | 7.0% | 21.1% | 30.7% | 41 |
-| instructions/s | 0.4% | 2.8% | 189.0% | 44 |
-| wakeups/s | 0.7% | 14.2% | 66.7% | 44 |
-| RSS | 0.2% | 0.9% | 11.7% | 44 |
-| cpu_frame ms | 9.3% | 26.3% | 34.1% | 41 |
-| projection ms | 14.7% | 29.9% | 41.0% | 41 |
-| glass ms | 9.8% | 26.5% | 31.5% | 27 |
-| scene commit ms | 9.7% | 24.9% | 33.7% | 41 |
-| gpu ms | 10.2% | 29.1% | 54.1% | 41 |
-
-### After the stage 0 fixes
-
-The same harness on the build with the glass-scale, projection-occlusion,
-autosave and session-reaping fixes (`after-stage0-fixes.json`, same machine, AC
-power) against the numbers above:
-
-* **Single scale (1 and 1.5):** instructions/s within 1-2 % on every scenario
- but `fullscreen` at 1.5 (-12 %). Timers and CPU % move inside the run-to-run
- noise. The fixture windows are ARGB without an opaque region, so the
- occlusion fix has nothing to cull here.
-* **Mixed scales:** the glass fix, as in finding 2: idle 8.9 % CPU → 0.00 %,
- `spinner_clear` -79 % instructions, `drag` -67 %, `zoom_70` -67 %,
- `zoom_min_hold` -80 %, `resize` -16 %, `fullscreen` -45 %.
-* **An opaque fullscreen client** (XRGB, one surface, 60 fps full damage, scale
- 1; the case the projection fix targets): instructions 60.4 → 27.8 M/s
- (-54 %), `cpu_frame` 0.394 → 0.150 ms (-62 %), and "Direct scan-out enabled"
- appears where it never did. CPU % stays 34-43 % because the dominant cost is
- the shm upload on commit, which scanout does not remove.
-* **Pixels:** 16 of 16 screenshots identical to the goldens at scale 1 and 1.5
- and for the mixed-scale second output, including the zoomed ones, so the
- culling is exact. Two mixed-scale images differ on the scale-1 output in 14
- pixels (at most 11 levels) at the edge of the straddling window's glass, the
- glass fix drawing that effect at the sharper scale.
-* **Other suites:** the 19 integration suites that exercise glass, outputs,
- damage, capture of windows, zoom and the session pass; `capture.py`,
- `screencast.py`, `single_pixel.py`, `desktop_zoom.py` and `mini_map.py` fail
- identically on the unfixed build.
-
-## Findings
-
-1. **No meaningful regression since `190cb65` (2026-09-23).** Interleaved
- ref/head/head/ref on AC power, each binary driven by its own commit's
- harness (the IPC envelope changed in between, and the desktop has since
- moved into the compositor, so desktop workloads compare reference
- compositor + `rediwm-desktop` CPU against HEAD compositor CPU). HEAD against
- the reference: empty-commit frames -32 % (HEAD skips redundant commits: 6-7
- commits in 4 s against 247), full damage -10 %, start-button hover -18 %,
- tray hover CPU -33 %, idle 0.00 % in both. Two rows are worse and
- consistent across rounds: **window drag** +73 % CPU and +76 % frame cost
- (finding 3), **menu open/scroll** +17 % frame cost (`scene_commit_cpu`
- 0.18 → 0.32 ms, `glass_cpu` 0.33 → 0.50 ms; not investigated) and
- **desktop pan** +26 % CPU / +48 % frame cost, which is `scene_commit_cpu`
- 0.19 → 0.28 ms with glass flat: the desktop canvas is now drawn by the
- compositor's own pass instead of a separate client, so it is not a
- like-for-like row. The
- compositor binary grew from 17.8 to 26.8 MB.
-2. **Two outputs at different scales never go idle while glass is on.** With
- no windows at all, outputs at scales 1 and 1.5 (or 1 and 2) commit about
- 118 frames/s forever: 7-9 % CPU (two runs: 6.9 and 8.9 %), ~216 M
- instructions/s, 70 wakeups/s, glass re-blurring every frame. Two outputs at the *same* scale are idle, and
- `REDIWM_NO_GLASS=1` takes the mixed case to 0 commits and 0.00 % CPU
- (`mixed_noglass`). It reproduces on `190cb65`, so it is not a regression.
- No panel, taskbar or animation counter moves; the likely mechanism is
- `glass.c` updating shared effect nodes once per output with that output's
- scale, so each output's update damages the other (not yet confirmed). It
- violates "idle makes no wakeups" for anyone with mixed-scale monitors. The
- mechanism is confirmed: the effect's output buffer is `width × scale` and
- its hash includes `scale`, but `rediwm_glass_update` passed the scale of
- whichever output was updating, so each output re-rendered the shared effect
- at its own scale and damaged the other. **Fixed** in
- `glass.c`: `effect_scale` takes the highest scale among the outputs the
- effect's target overlaps, independent of the caller. All five output
- scale pairs tried (1/1, 1.5/1.5, 1/1.5, 1/2, 1.5/1) now idle at 0 commits;
- single-scale screenshots are unchanged. `glass_hold.py` gained a mixed-scale
- idle case (180 commits in 1.5 s without the fix, 0 with). The mixed rows
- below are the unfixed baseline; `mixed_noglass` is the reference without
- the loop. Same harness, unfixed → fixed (`glass-scale-fix.json`):
-
- | Mixed scales | CPU % | Minstr/s | commits |
- |---|--:|--:|--:|
- | `idle` | 8.91 → 0.00 | 215.6 → 0.0 | 594 → 0 |
- | `spinner_clear` | 11.88 → 5.93 | 236.9 → 48.4 | 473 → 247 |
- | `drag` | 10.25 → 5.16 | 249.3 → 81.3 | 494 → 491 |
- | `resize` | 22.45 → 17.68 | 650.5 → 550.1 | 454 → 465 |
- | `zoom_70` | 11.63 → 6.76 | 236.1 → 78.0 | 470 → 246 |
-
- Scale 1.5 on the same two builds: instructions/s within 2 % on all eleven
- scenarios (e.g. `spinner_glass` 71.1 → 71.2, `resize` 489.6 → 487.7), so the
- fix costs nothing where it does not apply.
-3. **The default theme no longer holds glass during a drag.** Default
- `window_bg` alpha went from 0.98 to 0.80 (`ui/theme.zig`), the hold needs
- at least 0.98 (`chrome.titlebarGlassMayHold`, unchanged), so a drag now
- re-blurs the titlebar every frame: against `190cb65` (AC A/B) `glass_cpu`
- 0.006 → 0.231 ms and `gpu_elapsed` 0.29 → 0.52 ms per drag frame. `tests/glass_hold.py` fails on its first (`default`)
- case for the same reason: the test still expects the default to hold.
-4. **One re-blurred glass effect costs about 0.17 ms CPU and 0.2 ms GPU per
- frame** (`spinner_glass` against `spinner_clear`, scale 1.5, AC, two runs:
- `glass_cpu` 0.184-0.201 vs 0.017-0.020, `gpu_elapsed` +0.17-0.23 ms,
- instructions 71 vs 40 M/s, CPU 5.2-6.9 % vs 4.1-4.2 %). Resize is the heaviest compositor-side load (14-16 %
- CPU, 313-490 M instr/s) and glass is half of its frame time (0.5-0.6 of
- 1.0-1.2 ms). This is the cost stage 5 targets; the earlier ~0.35 ms figure
- in the plan was measured at lower clocks.
-5. **A fullscreen 60 fps client costs 33-40 % of a core**, all on the main
- thread, with only 0.35-0.40 ms in the frame stages and about 1 M
- instructions per frame (stalled or kernel time, not compute), and +6 to
- +27 MiB RSS. Same with glass off. It sits outside the frame timers and
- outside this plan; the cause is unprofiled (likely the shm upload in the
- commit handler), but it dominates that row, so judge `fullscreen` by
- instructions and the stages, not CPU %.
-6. **Direct scanout never engaged, and the cause also meant no window occluded
- anything.** wlroots decides a client surface is opaque from its raw buffer's
- format (XRGB covers the surface) or the client's `set_opaque_region` and
- keeps it in the node's opaque region. The projection copied only the view's
- `buffer_is_opaque`, and the view's buffer is a `wlr_client_buffer`, which
- exposes no format, so it was false for every client. No window culled what
- was below it: every damaged frame redrew the wallpaper and the windows
- underneath (a wlroots render list of 3 for one fullscreen client instead of
- 1), and a fullscreen client could never be the single entry left to scan
- out. **Fixed**: `mirror_opaque` in `projection.c` carries the source's
- region onto the view (exact at 1:1; scaled and pulled one pixel inward
- otherwise, never larger than the real one), and the view-state cache
- includes it. `direct_scanout.py` shows "Direct scan-out enabled" for an XRGB
- and for an ARGB-plus-opaque-region fullscreen client and none for a
- translucent one (the XRGB case fails on the previous build); `projection_test.c`
- covers full, partial, changed, scaled and translucent regions. Per-surface
- dmabuf feedback is also never sent (rows 9 and 10), which is a separate gap.
-7. **Gate on instructions and RSS; treat timers with care.** Two identical runs
- differ by a median 0.4 % (p90 2.8 %) in instructions/s and 0.2 % (p90
- 0.9 %) in RSS, but ~10 % (p90 25-30 %) in every frame-stage timer and 7 %
- (p90 21 %) in CPU %. Only compare timers across a margin above ~30 % or
- over repeated runs.
-8. **Power state invalidated a first attempt.** On battery the same work ran
- about twice as slow (`scene_commit_cpu` 0.19 vs 0.098 ms for the same
- spinner; effective clock 0.7 vs 1.1 GHz). The harness now refuses to start
- off AC power and records the power state of every session; `--allow-battery`
- overrides. The first A/B and trial runs of this stage were repeated on AC.
-9. **Goldens are deterministic on this machine.** 16 screenshots (4 per
- output: `windows`, `fullscreen`, `zoom70`, `zoom_min`) were identical, to the
- level, between two runs, so `--compare` can use a tolerance of 0-2 levels
- locally. Other GPUs or Mesa versions will differ (GLES2 at a fractional
- scale can move one level with render history).
-10. **The layout autosave could move a window back within 37 s of start.**
- `session/layout_autosave.zig` wrote the layout every 10 s and restored from
- that same file at about 2, 7, 17 and 37 s after start, so a window moved,
- resized or made fullscreen shortly before a restore tick was put back where
- it had been up to 10 s earlier; a fullscreen window kept its fullscreen
- size but was moved to its old origin (`client_box` jumped from (0,0) to
- (700,40) while `fullscreen` stayed true). **Fixed**: the attempts now share
- one snapshot taken at startup (`FlatRestore`), each saved row is claimed by
- one window, each window is placed once, fullscreen and maximized windows
- are left alone, and the periodic save waits while rows are unclaimed.
- `layout_autosave.py` moves the window between the 10 s save and the 17 s
- attempt (it snapped back before). The harness still gives the compositor an
- uncreatable state directory so runs never read or write real state.
-
-## What `wlr_scene_output` does today
-
-References are to wlroots 0.20.2 `types/scene/wlr_scene.c` (`W:`) and
-`types/scene/surface.c` (`S:`); RediWM files are in `src/`. RediWM does not
-render its source tree: `projection.c` mirrors it into a second tree of plain
-`wlr_scene_buffer`/`wlr_scene_rect` nodes (the view) and routes each surface's
-`outputs_update`, `output_sample` and `frame_done` listeners onto the view
-node, so every item below is evaluated on the *presented* geometry. That table
-is the checklist for stage 3: an owned pass must either reproduce a row or
-record a conscious drop.
-
-| # | Behaviour (wlroots) | How RediWM gets it today | Stage 3 check |
-|---|---|---|---|
-| 1 | **Output lifecycle.** Create attaches commit/damage/needs-frame listeners and a damage ring (W:1766); a commit that changes mode, enabled, transform, scale or subpixel damages the whole output and re-evaluates every buffer node's outputs (W:1700); destroy leaves all nodes (W:1832); position follows the output layout (W:1884). | `Output.zig` `createSceneOutput` + `scene_output_layout.addOutput`; `scene_output.destroy()` runs first in the output teardown, before any scene mutation. | `output_destroy`, `display_arrangement`, `output_scale`, hotplug and mode-change cases of the suites below. |
-| 2 | **Damage.** Node moves, resizes, buffer changes and visibility changes damage every output they touch (W:397); `wlr_damage_ring` rotated by swapchain buffer age gives the region to repaint (W:2535); `pending_commit_damage` is what the backend has not acknowledged (W:1709); scale, transform or gamma-transform changes damage everything (W:2357-2371, 2338). `needs_frame` = output latch, pending damage or gamma change (W:2183). | `Output.runFrame` asks `scene_output.needsFrame()`; `commitIsRedundant` reads `scene_output.private.pending_commit_damage` and `gamma_lut_changed` directly, so skipped commits depend on private wlroots fields. | `desktop_damage`, `panel_damage`, `glass_hold`, `zig build test-projection`; buffer-age correctness under an effect (stage 1 gate). |
-| 3 | **Visibility and culling.** Every node keeps a `visible` region (opaque regions above subtract, W:650/722); nodes with an empty region are skipped in the render list and in frame-done (W:1961, 1122); a black rect, and at integer scale an opaque black single-pixel buffer, is not drawn because the background is black (W:1941-1959); the black clear covers only damage not under an opaque node, grown by 1 px at fractional scale (W:2538-2579); opaque nodes blend with `NONE` (W:1549). | Projection sets each view node's opaque region from `buffer_is_opaque` and, for client surfaces, mirrors the source node's own region (`mirror_opaque`): exact at 1:1, scaled and pulled one pixel in otherwise. Until 2026-10-09 it copied only `buffer_is_opaque`, which is false for every `wlr_client_buffer`, so no client window occluded anything. | Occlusion cases in `popup_constraint`, `layer_lifecycle`, `lock_screen`; CPU/GPU cost against baseline. |
-| 4 | **Per-node draw.** Paint order = tree order; clip = visible ∩ damage in buffer coordinates, rounded outward at fractional scale; destination box by `round(len·s)` vs `round((off+len)·s)−round(off·s)`; buffer/output transform composition; `src_box`; bilinear/nearest by node mode; alpha = node opacity; premultiplied blend; single-pixel buffers drawn as rects (W:1451-1582). A node whose texture cannot be created re-damages itself (W:1520). | Same code, fed by view nodes; projection picks bilinear whenever zoom ≠ 1. | `screenshot_regressions`, `edge_sampling` (until deleted), mixed-scale and zoom suites, pixel diff against the stage 0 goldens. |
-| 5 | **Explicit sync.** Each buffer carries `wait_timeline/point`, waited on GPU-side with an EGL wait-sync before sampling (GLES2 `pass.c:206`). Release points are `scene_output.in_timeline/in_point`, signalled from an EGL fence imported as a sync file (`pass.c:42`; otherwise `glFlush`); only created with a DRM backend and renderer timeline support (W:1794). | Projection copies the wait point to the view (`projection.c`, `.wait_timeline`); `explicit_sync.c` adds `ReadFence` and `AcquireWait` for other GPU or CPU reads. | `explicit_sync` (a real vkcube client on headless GLES2; skips without vkcube or a GPU); release points on a DRM backend are manual. |
-| 6 | **Frame callbacks.** `send_frame_done` walks enabled nodes; a buffer node emits `frame_done` only when its visible region is non-empty (W:1120, 2664); the surface handler delivers `wl_surface.frame` only for the surface's pacing output: the entered, non-suspended output with the highest refresh (S:182). | `Output.zig` calls `scene_output.sendFrameDone` after each commit and, for skipped commits, from `vblank_timer` (`deferFrameDone`). | Frame-callback pacing in `perf`/`idle`, `desktop_damage`, `presentation_time`. |
-| 7 | **Enter/leave and preferred scale.** Per buffer node: output overlap > 10 % of its visible area makes the output active, the largest overlap is the primary output (W:416-536); the `outputs_update` handler sends `wl_surface.enter/leave`, with *no* leave when a node becomes fully hidden (suspended), the fractional preferred scale = largest entered-output scale, `preferred_buffer_scale = ceil` and the colour-manager preferred description (S:93-156). | Routed onto view nodes, so enter/leave follows the zoomed, on-screen footprint. Preferred scale ignores camera zoom (see the client-density note in memory). | `output_scale`, `wlr_protocols`, `xwayland_fractional`, mixed-scale and zoom suites. |
-| 8 | **Presentation feedback.** `output_sample` marks the surface `textured` (or `scanned_out`) on its pacing output; `wlr_presentation` sends the feedback from the output's present event (S:158). | `Server.zig` creates `wlr.Presentation`; the sample event comes from view nodes. | `presentation_time`. |
-| 9 | **dmabuf feedback and preferred transform.** Scanout/composition tranches per surface (W:1988), only when `wlr_scene_set_linux_dmabuf_v1` was called and the node is a surface. | **Not provided today.** RediWM never calls `wlr_scene_set_linux_dmabuf_v1`, and view nodes carry no surface addon: clients only see the default (main-device) feedback. | None to reproduce. Decide whether to keep it dropped or add tranches with scanout. |
-| 10 | **Direct scanout.** Tried only when the render list has exactly one entry (after culling), no colour transform, no pending modeset, scanout allowed on the output, the buffer's transform and colour description match, and `wlr_output_test_state` accepts it; release through the out-timeline; hardware cursor stays on its plane (W:2061-2181, 2446). | Available for an opaque fullscreen client with everything else culled; `tearingAllowed`/`commitFrameState` sit beside it. **It never engaged** (no "Direct scan-out" line in the two retained live logs) because the projection dropped client opaque regions, so the wallpaper and every window under the client stayed in the list. **Fixed 2026-10-09**; it can be tested headless, since the headless backend accepts any buffer and wlroots logs the transitions. | `direct_scanout.py` (GLES2; XRGB, ARGB with an opaque region, and a translucent ARGB that must not scan out). The DRM release path (out-timeline, a real plane) still needs hardware. |
-| 11 | **Software cursors** are drawn into the same pass, limited to damage (W:2619). | `CursorState`/`committed_cursor` decide whether a skipped commit is safe. | Cursor suites (`client_cursor`, `cursor_shape`), `commitIsRedundant` cases. |
-| 12 | **Colour.** An output colour transform (gamma LUT, image description) is only rendered when the renderer has `output_color_transform`; GLES2 and pixman do not (`renderer.c:529`), so wlroots tries a KMS gamma state instead (W:2212, 2506). | RediWM never sets the scene's gamma-control manager; night light rides `Output.color` in `commitFrameState`. The colour-management protocol is wired (`extra_protocols.c`) but with GLES2 (`input_color_transform = false`) advertises no transfer functions or primaries, so only default sRGB/gamma 2.2 buffers exist. | Night-light and colour suites; nothing to reproduce in an owned GLES2 shader. |
-| 13 | **State build outside the frame path.** `build_state` consumes a swapchain buffer, rotates the damage ring and, with a timer, brackets the pass (W:2313). | Screenshots (`screenshot/capture.zig`) and IPC `sample_pixels` call it directly on the live scene output. | `capture`, `screencast`, `screenshot_regressions`: the buffer-age contract must survive a capture between two frames. |
-| 14 | **Hit testing** is `wlr_scene_node_at` with per-buffer `point_accepts_input`. | View nodes install `accepts`, which maps back to the source node. | `hotspots`, `popup_constraint`, input suites; shape-aware hit tests are new in stage 4. |
-| 15 | **Xwayland stacking.** The scene restacks X11 surfaces unless told not to (W:560-605). | `scene.restack_xwayland_surfaces = false`; `Toplevel.raise` owns the order. | `xwayland` suite. |
-
-## What wlroots GLES2 draws
-
-Everything the owned shader must reproduce or consciously drop, from
-`render/gles2` in 0.20.2. The whole shader set is five files totalling 111
-lines.
-
-| Item | Today | Owned pass |
-|---|---|---|
-| Programs | `quad` (uniform premultiplied colour), `tex_rgba` (`texture2D · alpha`), `tex_rgbx` (rgb, alpha forced to 1), `tex_external` (`samplerExternalOES · alpha`). | Reproduce all four; pick by `texture->target` and `has_alpha` exactly as `pass.c:175`. |
-| External-OES | Used for dmabufs only importable that way (extension `GL_OES_EGL_image_external` required); also the path for driver-converted YUV. | Needed: shader variant plus `gles2_get_texture` attribs (`wlr_gles2_texture_get_attribs`). |
-| Blending | `glBlendFunc(ONE, ONE_MINUS_SRC_ALPHA)` set once per pass; blending disabled when the node is opaque or (`!has_alpha && alpha == 1`). | Same; premultiplied everywhere (AGENTS.md: colours are premultiplied). |
-| Clipping | `render()` scissors each rectangle of the clip region; the pass starts with scissor off. | Replaced by the SDF clip plus damage scissor. |
-| Filtering | `glTexParameteri(MIN/MAG)` on the *shared* texture each draw. | Mutates state `glass.c` also reads: set it explicitly per draw or use sampler state. |
-| Texture transform | `tex_proj` matrix from buffer transform composed with the output transform and normalised `src_box`. | Reproduce (rotation, flips, viewport crops). |
-| Colour | `transfer_function`, `primaries`, `color_encoding`, `color_range`, `luminance_multiplier` and the pass `color_transform` are accepted and **ignored**; the shader samples RGB as stored. Nothing is advertised to clients on GLES2. | Nothing to match. If Vulkan ever becomes a target this is where parity would start. |
-| Sync | Acquire: `eglWaitSync` per texture; release: EGL fence → sync file → timeline, else `glFlush` at submit; context saved and restored around the pass. | Reproduce, including the single `glFlush` per pass that `glass.c` currently repeats per effect. |
-| Timing | `EXT_disjoint_timer_query` timer inside the pass. | RediWM uses its own `gpu_timing.c` around the frame; keep. |
-| Formats | `has_alpha` from the DRM format; swapchain format chosen by `wlr_output_configure_primary_swapchain`. | Unchanged. |
-| Not present | SDF clip, analytic borders and shadows, backdrop sampling. | New in the plan (stages 1, 4, 5). |
-
-Reading: the shader itself is trivial and colour is already a no-op on
-GLES2, so parity risk sits in the state machinery around it (context save and
-restore, scissor and damage, sync, texture target selection), not in colour.
-
-## Policy and renderer decisions
-
-The plan asks stage 0 to confirm these. Each has a recommendation and the
-evidence found; the last column is what is still open.
-
-| Decision | Recommendation | Evidence | Open |
-|---|---|---|---|
-| **Renderer policy** | Require GLES2 for the session; no pixman path. | Glass is already GLES2-only (`glass.c`); masked draws need it. `Renderer.autocreate` only lands on pixman when GLES2 init fails. Tests default to pixman (53 scripts read `REDIWM_TEST_RENDERER`) but only 4 use `DumpBuffer`, so flipping the default is mostly a default change plus those 4. A machine without a GPU would need Mesa llvmpipe via `WLR_RENDERER_ALLOW_SOFTWARE`. | **Decided 2026-10-09: require GLES2.** |
-| **Corner radius** | `Toplevel.cornerRadius`: `frameRadius × chromeDensity`, 0 when maximized or fullscreen. | Confirmed in code (`Toplevel.zig:1278`). | Confirmed. |
-| **Client-side-decorated windows** | Not clipped unless a rule asks. | A CSD client draws its own corners (and shadow) in its alpha; clipping them again with a different radius would shave or double them. Server-decorated native, Xwayland and `.shell` windows are clipped. | **Decided 2026-10-09: unclipped by default; a rule opts in.** |
-| **Footer reservation** | Drop `max(border, ceil(radius))` to the border width. | Needs the audit the plan lists (snap, resize edges, layout, saved layouts, Xwayland, tabs, tests pinning titlebar/body heights). | Audit at stage 4. |
-| **Colour management** | Nothing to reproduce; drop. | GLES2 ignores transfer function, primaries, range, encoding and luminance, cannot apply output transforms, and the colour manager advertises no transfer functions or primaries (`input_color_transform` is false). | Decided by evidence. |
-| **dmabuf feedback** | Keep dropped for now. | Never sent today (row 9). | Revisit with scanout. |
-| **Direct scanout** | Keep it as a stage 3 exit criterion. | It now engages and is testable headless (finding 6); only the DRM plane and release path need hardware. | A fullscreen opaque client on a real session. |
-| **Mixed-scale idle loop** | Fix in `glass.c` independently, now. | Finding 2: a pre-existing idle regression with a small likely cause. | **Decided 2026-10-09 and done** (finding 2). |
-| **`glass_hold.py`** | The default theme follows the backdrop; keep the 0.98 case as the hold. | Finding 3. | Done: the default case now expects a follow. |
diff --git a/docs/plans/scene-graph-stage1.md b/docs/plans/scene-graph-stage1.md
deleted file mode 100644
index 362d716..0000000
--- a/docs/plans/scene-graph-stage1.md
+++ /dev/null
@@ -1,121 +0,0 @@
-# Scene graph plan, stage 1: pass spike
-
-Status: stage 1 of [scene-graph.md](scene-graph.md), run 2026-10-09 on the
-machine and conditions of the [stage 0 baseline](scene-graph-baseline.md).
-Result: **every gate passes, after two design changes the gates forced.** Stage
-2 can start on this design; the open integration risks are listed at the end.
-
-## What was built
-
-A noninstalled fixture, not linked into the compositor:
-
-* `src/pass_spike.c`: the primitives an owned output pass needs, drawn on
- wlroots' own GLES2 context and a wlroots-allocated buffer's FBO, entering and
- leaving that context the way `glass.c` does. One fragment shader family (2D
- and external-OES samplers) evaluates a rounded-rectangle signed distance field
- in device pixels for the body (texture or solid), the border, an analytic
- shadow and a blurred-backdrop composite; the backdrop is a framebuffer copy,
- two blur passes at quarter size and a clipped composite.
-* `src/pass_spike_test.c`: ten pixel gates and a cost measurement.
-* `zig build test-pass-spike` (needs a render node; `WLR_RENDER_DRM_DEVICE` on a
- multi-GPU machine; add `-Doptimize=ReleaseSafe` for cost figures).
-
-Conventions the spike fixes: device pixels, y down, buffer row 0 is the top row
-(`ndc_y = py / height * 2 - 1`, so a GL scissor rectangle is an image
-rectangle), colours premultiplied, `glBlendFunc(ONE, ONE_MINUS_SRC_ALPHA)`. A
-window is an integer device rectangle with one radius per corner; titlebar,
-client and footer are quads that tile it (edges snapped as
-`round(off*s)`..`round((off+len)*s)`), all covered by the same distance field.
-
-## Gates
-
-| # | Gate | Result |
-|---|---|---|
-| 1 | Rounded clip against an 8×8 supersampled area-coverage reference at scales 1, 1.5, 2 and zoom 1, .85, .70, .55, .25; no channel outside the range of body and background (no fringe). | Pass: max error 12 levels (5.8 % of the 208-level range, the usual cost of distance-based AA on arcs), zero fringe values. |
-| 2 | Titlebar, client and footer pieces: every interior pixel is exactly its piece's colour, at every scale and zoom (no seam, no background leak). | Pass. |
-| 3 | Border and body in the same colour must equal one plain shape; with distinct colours the outer row is the border and the next row the body. | Pass (max diff 0) **after a design change, below.** |
-| 4 | Premultiplied edges: a 50 % premultiplied texel over the backdrop, opacity 0.5, and an XRGB texel with a junk alpha byte. | Pass (±2). |
-| 5 | An external-OES texture (an EGLImage of a dmabuf, bound to `GL_TEXTURE_EXTERNAL_OES`) through the clip equals the same pixels in a 2D texture, across the scale and zoom grid. | Pass (max diff 0). |
-| 6 | Analytic shadow: monotonic falloff, zero outside its footprint and inside the window, equal to the Gaussian edge profile on a straight edge. | Pass (max diff 0 against `erfc`). Corners are approximate; not compared to the current CPU shadow yet. |
-| 7 | Backdrop from a framebuffer copy: red/blue step under the window blurs to an even mix at the step, monotonic, far sides unchanged, nothing leaks past the clip; at the buffer edge the blur replicates the edge, no black. | Pass. |
-| 8 | Buffer-age damage under an effect: repaint only the damaged rectangle into the previous frame's buffer. | Pass: expanding damage to the effect's shape when it reaches its sample extent equals a full repaint; without the expansion 3146 values stay stale (the control). |
-| 9 | Cost against the stage 0 baseline. | Pass, below. |
-| 10 | The spike and wlroots' own render pass draw the same premultiplied rectangle into the same buffer identically (orientation, blend, colour). | Pass (max diff 0), **after a test fix that is itself an integration rule, below.** |
-
-### Cost (783×69 titlebar effect at scale 1.5, ReleaseSafe, AC, 5 runs)
-
-| | Stage 0 baseline (one re-blurred `glass.c` effect) | Spike |
-|---|---|---|
-| CPU per frame | +0.17 ms | 0.006-0.019 ms submit |
-| GPU per frame | +0.2 ms | 0.208-0.224 ms wall including the GPU |
-| One full window (shadow, three pieces, border) | n/a | 0.003-0.007 ms submit, 0.079-0.089 ms wall |
-
-The CPU cost nearly disappears (no scene prefix walk, no private render pass,
-no per-effect context switch or `glFlush`); the GPU cost is the same, since the
-copy and the blur remain. The wall figures are one `glFinish` per 300 frames, so
-they are throughput, not latency.
-
-## Design changes the gates forced
-
-1. **The border belongs in the piece's fragment shader, not in a second draw.**
- A ring drawn "over" a body leaves `dst × a_body × a_ring` of the backdrop
- showing through wherever both are partly covered: a bright seam of 53 levels
- along the inner edge of every border (gate 3 failed on this). Both are
- evaluated at the same fragment (`inner = cov(d + b)`, `ring = cov(d) -
- cov(d + b)`), so their coverages add to the shape's. The same rule applies to
- the backdrop composite. The plan's separate "border primitive" becomes a
- parameter of every piece.
-2. **A scissor and damage rule for effects.** A partial repaint of a buffer with
- age must also repaint every effect whose sample extent (shape plus padding)
- the damage touches, even though the effect's own rectangle is undamaged; the
- copy then reads current pixels in the damage and valid stale ones elsewhere.
- The effect's composite runs under the caller's scissor while its copy and
- blur passes run unscissored (gate 8).
-
-Smaller points the spike settled: piece joins on integer device pixels need no
-special seam handling (a quad covers each pixel once; only the shape edge is
-anti-aliased); a shadow is clipped out of the window only when the body is
-translucent (otherwise it would be attenuated twice at the edge); the backdrop
-copy is clamped to the framebuffer with the blur's sampling limits set, which
-replicates the edge instead of bleeding black.
-
-## Integration rules found
-
-* **wlroots draws with client-side vertex arrays**, which read from the bound
- `GL_ARRAY_BUFFER` if there is one. Calling wlroots' pass with the spike's quad
- buffer still bound drew half a rectangle (gate 10 failed on this, 103 levels).
- Any owned GL work has to restore the array-buffer binding (and, as `glass.c`'s
- `leave()` does, the rest of the state it touches) before wlroots draws, and
- re-enter afterwards. Once the output pass is owned, this is only a concern for
- the remaining wlroots entry points (screenshots, texture uploads).
-* The owned pass can write the swapchain buffer through
- `wlr_gles2_renderer_get_buffer_fbo` and agrees with wlroots' pass on
- orientation, blend and colour (gate 10), so scanout and capture see the same
- image.
-
-## Not yet proven (for stage 2 and 3)
-
-* Real client textures: shm uploads through `wlr_client_buffer`, the texture
- target wlroots reports (`wlr_gles2_texture_get_attribs`), and YUV dmabufs that
- need external sampling with driver conversion. The spike imports one RGBA
- dmabuf itself.
-* The swapchain's real buffer age and `wlr_damage_ring` (the spike keeps one
- persistent buffer), explicit-sync acquire and release points, software
- cursors, and subsurface and popup ordering.
-* Direct scanout: finding 6 of the baseline made it work in the old presenter;
- the owned pass must keep one entry per scanout-eligible client or it
- regresses that.
-* Quality of the quarter-size blur against `glass.c` side by side, the analytic
- shadow's corners against the CPU shadow, and the colour of window opacity
- under zoom.
-* Multi-output with different scales (the pass renders per output; effects are
- per output and need no shared scale, which also removes the idle loop the
- stage 0 glass fix addressed).
-
-## Verdict
-
-The primitives work on wlroots' own GLES2 context and buffers, produce no seams
-or fringe at any tested scale or zoom, draw an external-OES texture identically
-to a 2D one, handle damage under an effect, and cost no more than the current
-glass path (far less CPU, the same GPU). Proceed to stage 2, carrying the two
-design changes above.
diff --git a/docs/plans/scene-graph-stage2.md b/docs/plans/scene-graph-stage2.md
deleted file mode 100644
index 3a59a0a..0000000
--- a/docs/plans/scene-graph-stage2.md
+++ /dev/null
@@ -1,116 +0,0 @@
-# Scene graph plan, stage 2: typed node model behind the presenter
-
-Status: stage 2 of [scene-graph.md](scene-graph.md), done 2026-10-09 on the machine
-and conditions of the [stage 0 baseline](scene-graph-baseline.md). Result: **no
-visible change** (16 of 16 golden screenshots bit-identical), instructions/s and RSS
-flat, and a measured **+13 % on a steady-state projection sync** (about 1.3 µs on a
-288-leaf desktop). `projection.h` and every Zig caller are untouched.
-
-## What was built
-
-`projection.c`'s one `project()` walk composed the transform, rounded and wrote
-`wlr_scene` setters in the same function. It is now two phases around a typed graph:
-
-* **`src/scene_graph.h`** (pure, no wlroots calls, no state): `rediwm_xform` (uniform
- scale plus translation, composed by `rediwm_xform_scale_about`), `rediwm_edges`
- (a rectangle as four unrounded edges), `rediwm_edges_snap` (the only rounding),
- `rediwm_content` (opacity, colour, source box, transform, filter, colour
- description) and `rediwm_item` (kind, enabled, source size, scale, edges,
- content). The kinds are `RECT`, `SURFACE`, `BUFFER` (compositor-owned raster) and
- `EFFECT` (a glass backdrop). `EFFECT` replaces the old test of a node's
- `point_accepts_input` function pointer.
-* **`resolve()`** walks the source tree and writes, for every leaf, a `rediwm_item`
- and, for every top-level group, an unrounded origin; groups and the leaves under
- them are linked in paint order (`projection->paint`, `group->items`). It moves,
- sizes and shows no view node.
-* **`present()`** reads only that graph (plus the content the source still owns, see
- below), rounds once and applies: group origins, reparenting, ordering, the setters
- behind the `view_state` cache, buffer swaps and damage, and hiding what the pass
- no longer reaches. It derives no geometry.
-
-Every expression in `scene_graph.h` is the one `project()` evaluated inline (same
-operands, same order); a rounding that moves by one pixel at a half-pixel edge would
-be a visible change. A rectangle is carried as **edges, not origin and size**, so a
-size is always the difference of two rounded edges and neighbours that share an edge
-share a pixel column at any zoom.
-
-## Gates
-
-| # | Gate | Result |
-|---|---|---|
-| 1 | The existing `projection_test.c` assertions pass unchanged. | Pass. Only the glass stub became controllable (it returned `false`; it now returns whether the node is the test's effect node). |
-| 2 | The 16 stage 0 goldens (scale 1, 1.5 and mixed; windows, fullscreen, zoom 0.70 and `camera_zoom_min`; both outputs) against a `HEAD` binary built from the parent commit. | **All 16 identical: max difference 0, 0 pixels over tolerance.** |
-| 3 | `zig build test`, `test-glass`, `test-pass-spike`, Debug and `-Doptimize=ReleaseSafe` builds. | Pass; `zig build test` prints the same two stderr lines as `HEAD`. |
-| 4 | Cost in the harness (A-B-B-A, `HEAD` against this change, scale 1, 1.5 and mixed, 10 scenarios each). | Instructions/s geometric mean new/head **1.007, 1.003, 1.001** (worst scenario 1.046); RSS 1.004–1.007 (under 1 MiB). |
-| 5 | Cost of the sync itself (`projection.c` old against new, same compiler, 12 windows × 24 leaves, nothing moving, interleaved). | **+13 %**: about 9.5–10.6 µs → 11.0–11.2 µs per sync. In the harness `projection_cpu` reads +22.9 % against control timers (`scene_commit`, `glass`, `cpu_frame`) that drifted +9.5 to +11.5 % in the same runs, so about +12 % net: the same figure by two methods. |
-
-The extra cost is list work per leaf (detach, insert, an 88-byte content copy);
-about 4.5 ns a leaf, 0.3 % of a typical 0.4 ms frame. It was not reduced: the stage 3
-pass will iterate these lists instead of the view tree, which is where it pays back.
-
-The harness runs overlapped with other work on the machine (compiles and bus probes
-of mine, and the live session's own load, see
-[the Services client](#unrelated-finding-the-services-client)), so its CPU % and
-frame timers swing ±20–60 %; only instructions/s, RSS and the paired comparisons
-above are claimed.
-
-## Tests
-
-`test_graph` in `projection_test.c` pins what the stage adds:
-
-* resolve alone moves no view (positions, sizes, the applied-state cache);
-* items are typed (`RECT`, `BUFFER`, `SURFACE` once wlroots binds a surface,
- `EFFECT`) and hold the **exact, unrounded** edges at fractional zoom and window
- scale, in the order the camera, the window zoom about its origin and the size
- compose;
-* scaled content is filtered bilinearly whatever the client asked for;
-* every presented view is exactly the snap of its item (`assert_presented`), at zoom
- steps across a fixed-desktop group;
-* paint order through raise, reparent, a disabled branch and a subtree the pass no
- longer reaches, and the lists after each destruction order.
-
-Mutants confirmed the guards bite: removing the detach in `finish_group` fails the
-list-lifetime probe, leaving stale leaf links in `resolve` trips a wlroots assert,
-and moving a view in `resolve` fails the existing damage test.
-
-**A trap found on the way.** The first lifetime test passed with the bug in place.
-The dangling list head only arises in the view-first teardown (`group_view_destroy`
-frees the group, then a leaf's own teardown writes into it), and glibc 2.44 does not
-poison small freed chunks (they go straight to the tcache, contents intact), neither
-under `mallopt(M_PERTURB)` nor `MALLOC_PERTURB_`. The test now puts a probe addon on
-each leaf view, which runs after the group is freed and before the leaf's own
-teardown, and checks the links directly; it also counts its checks so a wrong
-ordering assumption fails loudly instead of checking nothing.
-
-## What stage 2 does not do
-
-* **No `clip` and no tree opacity.** The plan lists them for the graph; nothing can
- produce or consume them before stage 4 (a producer on `Toplevel`, a consumer in the
- owned pass), and a resolved but unused field is dead code with nothing to test it.
- They enter with their first producer: a field on the item, not a computation in
- `present_leaf` (this is in `AGENTS.md`).
-* **Content identity is still the source's.** `present` reads the buffer, its wait
- point and the opaque region from the source node, and tracks surface damage in the
- leaf. They move into the item with the first consumer that is not `wlr_scene`
- (stage 3, which needs the texture and the acquire point).
-* **The source tree is still integer and `wlr_scene`.** About 108 Zig call sites set
- positions on it; floats enter as the camera, window zoom and Xwayland `1/N` scale
- compose. A fractional placement needs a producer like `setTreeZoom`.
-* **Others still read the view tree's geometry:** `glass.c` (`wlr_scene_node_coords`,
- `dst_width`, `rediwm_projection_node_zoom`) until stage 5, and hit testing
- (`accepts` maps through the view's size) until stage 4.
-
-## Next: stage 3
-
-The graph is complete enough for the owned pass to consume without the view tree:
-groups in paint order, leaves in paint order, float edges, scale, kind and content.
-What it still needs from the source, in the order the baseline's `wlr_scene_output`
-inventory lists it: the texture and acquire point, the opaque region (to cull), and
-per-output damage. The owned pass replaces `present` for rendering while `present`
-keeps serving `wlr_scene_output` until stage 6.
-
-## Unrelated finding: the Services client
-
-Found while measuring: the live session's PID 1 and polkitd were each at about 50 %
-of a core. That is `systemd.zig`, not this work, and is fixed in the same working
-tree (see `src/control_center/AGENTS.md`, "The Services client").
diff --git a/docs/plans/scene-graph-stage3-results.json b/docs/plans/scene-graph-stage3-results.json
deleted file mode 100644
index 60ec77d..0000000
--- a/docs/plans/scene-graph-stage3-results.json
+++ /dev/null
@@ -1,1429 +0,0 @@
-{
- "date": "2026-10-09",
- "base_commit": "958422f",
- "build": "ReleaseSafe, working tree with owned output/capture, early culling, cached GL state and private VAO/VBO",
- "device": "/dev/dri/renderD128 (Intel Iris Xe)",
- "cpus": [
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9
- ],
- "profile": "balanced, schedutil, balance_power, AC",
- "order": "owned, legacy, legacy, owned per output configuration",
- "seconds_per_scenario": 4,
- "concurrency": "No other agent builds or integration suites during this paired run; host session remains running.",
- "goldens": {
- "compared": 16,
- "max_channel_difference": 0,
- "configs": [
- "scale1",
- "scale1.5",
- "mixed"
- ],
- "states": [
- "windows",
- "fullscreen",
- "zoom70",
- "zoom_min"
- ],
- "final_optimized_build_rechecked": true
- },
- "runs": [
- {
- "config": "scale1",
- "presenter": "owned",
- "scenario": "clear",
- "seconds": 4.0,
- "commits": 252,
- "instructions_per_commit": 635430.5079365079,
- "scene_commit_cpu_ms": 0.20331270634920637,
- "projection_cpu_ms": 0.0442445753968254,
- "glass_cpu_ms": 0.036136214285714285,
- "gpu_elapsed_ms": 0.23581433333333335,
- "cpu_frame_ms": 0.49083909523809527,
- "rss_kb": 133720,
- "rss_anon_kb": 44424
- },
- {
- "config": "scale1",
- "presenter": "owned",
- "scenario": "glass",
- "seconds": 4.0,
- "commits": 246,
- "instructions_per_commit": 1093875.3333333333,
- "scene_commit_cpu_ms": 0.23036745528455285,
- "projection_cpu_ms": 0.04356184146341463,
- "glass_cpu_ms": 0.3862737479674797,
- "gpu_elapsed_ms": 0.6256821747967479,
- "cpu_frame_ms": 0.8692315731707316,
- "rss_kb": 133720,
- "rss_anon_kb": 44424
- },
- {
- "config": "scale1",
- "presenter": "legacy",
- "scenario": "clear",
- "seconds": 4.0,
- "commits": 251,
- "instructions_per_commit": 637605.0677290837,
- "scene_commit_cpu_ms": 0.20543898804780875,
- "projection_cpu_ms": 0.044109741035856576,
- "glass_cpu_ms": 0.035951725099601595,
- "gpu_elapsed_ms": 0.2371127888446215,
- "cpu_frame_ms": 0.4960394940239044,
- "rss_kb": 132484,
- "rss_anon_kb": 43028
- },
- {
- "config": "scale1",
- "presenter": "legacy",
- "scenario": "glass",
- "seconds": 4.0,
- "commits": 246,
- "instructions_per_commit": 1124024.3902439023,
- "scene_commit_cpu_ms": 0.22806120731707316,
- "projection_cpu_ms": 0.043331552845528455,
- "glass_cpu_ms": 0.3900762804878049,
- "gpu_elapsed_ms": 0.6529987886178862,
- "cpu_frame_ms": 0.8709517601626016,
- "rss_kb": 132556,
- "rss_anon_kb": 43100
- },
- {
- "config": "scale1",
- "presenter": "legacy",
- "scenario": "clear",
- "seconds": 4.0,
- "commits": 252,
- "instructions_per_commit": 638166.9206349206,
- "scene_commit_cpu_ms": 0.18260889285714288,
- "projection_cpu_ms": 0.036860646825396824,
- "glass_cpu_ms": 0.031667210317460316,
- "gpu_elapsed_ms": 0.2115257341269841,
- "cpu_frame_ms": 0.4320969563492063,
- "rss_kb": 132708,
- "rss_anon_kb": 43388
- },
- {
- "config": "scale1",
- "presenter": "legacy",
- "scenario": "glass",
- "seconds": 4.0,
- "commits": 248,
- "instructions_per_commit": 1124529.7258064516,
- "scene_commit_cpu_ms": 0.19714277822580645,
- "projection_cpu_ms": 0.03602835483870968,
- "glass_cpu_ms": 0.3349230766129032,
- "gpu_elapsed_ms": 0.5657360403225806,
- "cpu_frame_ms": 0.7425787983870967,
- "rss_kb": 132740,
- "rss_anon_kb": 43420
- },
- {
- "config": "scale1",
- "presenter": "owned",
- "scenario": "clear",
- "seconds": 4.0,
- "commits": 251,
- "instructions_per_commit": 636919.8247011952,
- "scene_commit_cpu_ms": 0.20886372908366532,
- "projection_cpu_ms": 0.04447364143426295,
- "glass_cpu_ms": 0.03711133067729084,
- "gpu_elapsed_ms": 0.23856261354581673,
- "cpu_frame_ms": 0.5054675577689243,
- "rss_kb": 134064,
- "rss_anon_kb": 44784
- },
- {
- "config": "scale1",
- "presenter": "owned",
- "scenario": "glass",
- "seconds": 4.0,
- "commits": 246,
- "instructions_per_commit": 1094253.3983739838,
- "scene_commit_cpu_ms": 0.2368440406504065,
- "projection_cpu_ms": 0.04526101219512195,
- "glass_cpu_ms": 0.3990126219512195,
- "gpu_elapsed_ms": 0.6641239227642276,
- "cpu_frame_ms": 0.8978144349593495,
- "rss_kb": 134064,
- "rss_anon_kb": 44784
- },
- {
- "config": "mixed",
- "presenter": "owned",
- "scenario": "clear",
- "seconds": 4.0,
- "commits": 253,
- "instructions_per_commit": 840312.0632411067,
- "scene_commit_cpu_ms": 0.09755150597609562,
- "projection_cpu_ms": 0.03229598605577689,
- "glass_cpu_ms": 0.034837826693227096,
- "gpu_elapsed_ms": 0.12777348406374503,
- "cpu_frame_ms": 0.3300088605577689,
- "rss_kb": 137620,
- "rss_anon_kb": 48416
- },
- {
- "config": "mixed",
- "presenter": "owned",
- "scenario": "glass",
- "seconds": 4.0,
- "commits": 494,
- "instructions_per_commit": 745748.0971659919,
- "scene_commit_cpu_ms": 0.1672468056680162,
- "projection_cpu_ms": 0.030739548582995952,
- "glass_cpu_ms": 0.2068701093117409,
- "gpu_elapsed_ms": 0.4145201821862348,
- "cpu_frame_ms": 0.5432243137651822,
- "rss_kb": 138072,
- "rss_anon_kb": 48420
- },
- {
- "config": "mixed",
- "presenter": "legacy",
- "scenario": "clear",
- "seconds": 4.0,
- "commits": 252,
- "instructions_per_commit": 833333.1746031746,
- "scene_commit_cpu_ms": 0.09983343426294822,
- "projection_cpu_ms": 0.033689219123505976,
- "glass_cpu_ms": 0.03512302390438247,
- "gpu_elapsed_ms": 0.13324059960159362,
- "cpu_frame_ms": 0.33828043227091636,
- "rss_kb": 136588,
- "rss_anon_kb": 47540
- },
- {
- "config": "mixed",
- "presenter": "legacy",
- "scenario": "glass",
- "seconds": 4.0,
- "commits": 492,
- "instructions_per_commit": 743162.756097561,
- "scene_commit_cpu_ms": 0.15629716463414636,
- "projection_cpu_ms": 0.0349070081300813,
- "glass_cpu_ms": 0.2196932093495935,
- "gpu_elapsed_ms": 0.4149467743902439,
- "cpu_frame_ms": 0.5599599613821139,
- "rss_kb": 136588,
- "rss_anon_kb": 47540
- },
- {
- "config": "mixed",
- "presenter": "legacy",
- "scenario": "clear",
- "seconds": 4.0,
- "commits": 252,
- "instructions_per_commit": 834689.6507936508,
- "scene_commit_cpu_ms": 0.0948003984063745,
- "projection_cpu_ms": 0.0320561015936255,
- "glass_cpu_ms": 0.03382079282868526,
- "gpu_elapsed_ms": 0.12117830677290838,
- "cpu_frame_ms": 0.32450695219123504,
- "rss_kb": 136896,
- "rss_anon_kb": 47736
- },
- {
- "config": "mixed",
- "presenter": "legacy",
- "scenario": "glass",
- "seconds": 4.0,
- "commits": 495,
- "instructions_per_commit": 743185.995959596,
- "scene_commit_cpu_ms": 0.15380932323232321,
- "projection_cpu_ms": 0.03176704646464647,
- "glass_cpu_ms": 0.21012514141414143,
- "gpu_elapsed_ms": 0.396517296969697,
- "cpu_frame_ms": 0.5339361696969697,
- "rss_kb": 137024,
- "rss_anon_kb": 47736
- },
- {
- "config": "mixed",
- "presenter": "owned",
- "scenario": "clear",
- "seconds": 4.0,
- "commits": 252,
- "instructions_per_commit": 842394.0317460317,
- "scene_commit_cpu_ms": 0.09777792430278884,
- "projection_cpu_ms": 0.03288159362549801,
- "glass_cpu_ms": 0.03423581274900398,
- "gpu_elapsed_ms": 0.12753152589641434,
- "cpu_frame_ms": 0.33354158366533865,
- "rss_kb": 138396,
- "rss_anon_kb": 49084
- },
- {
- "config": "mixed",
- "presenter": "owned",
- "scenario": "glass",
- "seconds": 4.0,
- "commits": 492,
- "instructions_per_commit": 749219.0487804879,
- "scene_commit_cpu_ms": 0.16657971138211383,
- "projection_cpu_ms": 0.0323449918699187,
- "glass_cpu_ms": 0.21850303048780487,
- "gpu_elapsed_ms": 0.4199484349593496,
- "cpu_frame_ms": 0.5636249471544715,
- "rss_kb": 138396,
- "rss_anon_kb": 49084
- }
- ],
- "follow_up": {
- "date": "2026-10-09",
- "changes": [
- "Detach linked shaders before deletion so compiler objects can be freed",
- "Skip GL setup and acquire waits for empty clips",
- "Add --modes paired to tests/scene_baseline.py"
- ],
- "command": "WLR_RENDER_DRM_DEVICE=/dev/dri/renderD128 python3 tests/scene_baseline.py --modes paired --configs scale1,scale1.5,mixed --out /tmp/scene-cost.json",
- "build": "ReleaseSafe",
- "profile": {
- "ac_online": true,
- "battery": "Not charging",
- "platform_profile": "balanced",
- "governor": "schedutil",
- "epp": "balance_power",
- "no_turbo": "0"
- },
- "cpus": [
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9
- ],
- "concurrency": "No concurrent builds or integration tests; host session remains running.",
- "order": [
- "owned",
- "legacy",
- "legacy",
- "owned"
- ],
- "seconds_per_scenario": 4.0,
- "runs": [
- {
- "config": "scale1",
- "presenter": "owned",
- "scenario": "clear",
- "seconds": 4.0,
- "commits": 252,
- "instructions_per_commit": 633180.6666666666,
- "scene_commit_cpu": 0.19526530555555557,
- "projection_cpu": 0.04261969841269841,
- "glass_cpu": 0.03361061111111111,
- "gpu_elapsed": 0.22316864682539683,
- "cpu_frame": 0.46627221428571425,
- "rss_kb": 133544,
- "rss_anon_kb": 44160
- },
- {
- "config": "scale1",
- "presenter": "owned",
- "scenario": "glass",
- "seconds": 4.0,
- "commits": 246,
- "instructions_per_commit": 1094089.9674796748,
- "scene_commit_cpu": 0.23365028048780487,
- "projection_cpu": 0.04284210569105691,
- "glass_cpu": 0.38588043089430896,
- "gpu_elapsed": 0.6458693617886179,
- "cpu_frame": 0.8697586951219511,
- "rss_kb": 133616,
- "rss_anon_kb": 44232
- },
- {
- "config": "scale1",
- "presenter": "legacy",
- "scenario": "clear",
- "seconds": 4.0,
- "commits": 251,
- "instructions_per_commit": 639534.7569721115,
- "scene_commit_cpu": 0.19679842231075698,
- "projection_cpu": 0.04185305577689243,
- "glass_cpu": 0.03302710756972111,
- "gpu_elapsed": 0.21491555378486055,
- "cpu_frame": 0.47230010756972113,
- "rss_kb": 132272,
- "rss_anon_kb": 42968
- },
- {
- "config": "scale1",
- "presenter": "legacy",
- "scenario": "glass",
- "seconds": 4.0,
- "commits": 247,
- "instructions_per_commit": 1123389.020242915,
- "scene_commit_cpu": 0.21538945748987856,
- "projection_cpu": 0.04015573279352226,
- "glass_cpu": 0.3610642793522267,
- "gpu_elapsed": 0.6118313983739837,
- "cpu_frame": 0.8082080364372469,
- "rss_kb": 132368,
- "rss_anon_kb": 43064
- },
- {
- "config": "scale1",
- "presenter": "legacy",
- "scenario": "clear",
- "seconds": 4.0,
- "commits": 252,
- "instructions_per_commit": 637063.126984127,
- "scene_commit_cpu": 0.19113257539682538,
- "projection_cpu": 0.04108574206349206,
- "glass_cpu": 0.03231691666666667,
- "gpu_elapsed": 0.21627458333333335,
- "cpu_frame": 0.4600490238095238,
- "rss_kb": 132676,
- "rss_anon_kb": 43344
- },
- {
- "config": "scale1",
- "presenter": "legacy",
- "scenario": "glass",
- "seconds": 4.0,
- "commits": 246,
- "instructions_per_commit": 1124221.918699187,
- "scene_commit_cpu": 0.2316945325203252,
- "projection_cpu": 0.0419090162601626,
- "glass_cpu": 0.3883349430894309,
- "gpu_elapsed": 0.667676581300813,
- "cpu_frame": 0.8679551260162601,
- "rss_kb": 132676,
- "rss_anon_kb": 43344
- },
- {
- "config": "scale1",
- "presenter": "owned",
- "scenario": "clear",
- "seconds": 4.0,
- "commits": 251,
- "instructions_per_commit": 638204.3187250996,
- "scene_commit_cpu": 0.19865179282868525,
- "projection_cpu": 0.040179653386454184,
- "glass_cpu": 0.033129011952191235,
- "gpu_elapsed": 0.22590411155378487,
- "cpu_frame": 0.4716349920318725,
- "rss_kb": 133156,
- "rss_anon_kb": 43772
- },
- {
- "config": "scale1",
- "presenter": "owned",
- "scenario": "glass",
- "seconds": 4.0,
- "commits": 245,
- "instructions_per_commit": 1095550.1224489796,
- "scene_commit_cpu": 0.24184124081632652,
- "projection_cpu": 0.04287936734693877,
- "glass_cpu": 0.38854123265306123,
- "gpu_elapsed": 0.6398580367346939,
- "cpu_frame": 0.8796244408163265,
- "rss_kb": 133156,
- "rss_anon_kb": 43772
- },
- {
- "config": "scale1.5",
- "presenter": "owned",
- "scenario": "clear",
- "seconds": 4.0,
- "commits": 251,
- "instructions_per_commit": 661549.9920318725,
- "scene_commit_cpu": 0.21547005976095618,
- "projection_cpu": 0.046880737051792826,
- "glass_cpu": 0.034931031872509954,
- "gpu_elapsed": 0.2466577689243028,
- "cpu_frame": 0.5133057410358566,
- "rss_kb": 137212,
- "rss_anon_kb": 47748
- },
- {
- "config": "scale1.5",
- "presenter": "owned",
- "scenario": "glass",
- "seconds": 4.0,
- "commits": 245,
- "instructions_per_commit": 1156640.8326530613,
- "scene_commit_cpu": 0.25575144081632656,
- "projection_cpu": 0.043631746938775515,
- "glass_cpu": 0.3887739755102041,
- "gpu_elapsed": 0.7016926040816327,
- "cpu_frame": 0.8919463795918368,
- "rss_kb": 137296,
- "rss_anon_kb": 47832
- },
- {
- "config": "scale1.5",
- "presenter": "legacy",
- "scenario": "clear",
- "seconds": 4.0,
- "commits": 251,
- "instructions_per_commit": 671820.4143426295,
- "scene_commit_cpu": 0.21080053784860556,
- "projection_cpu": 0.04345907171314741,
- "glass_cpu": 0.035161792828685264,
- "gpu_elapsed": 0.24874293625498006,
- "cpu_frame": 0.49705325896414343,
- "rss_kb": 135964,
- "rss_anon_kb": 46632
- },
- {
- "config": "scale1.5",
- "presenter": "legacy",
- "scenario": "glass",
- "seconds": 4.0,
- "commits": 246,
- "instructions_per_commit": 1171094.6016260162,
- "scene_commit_cpu": 0.23983134146341464,
- "projection_cpu": 0.04215923577235772,
- "glass_cpu": 0.37779319105691056,
- "gpu_elapsed": 0.6550937804878049,
- "cpu_frame": 0.8609837276422765,
- "rss_kb": 136044,
- "rss_anon_kb": 46712
- },
- {
- "config": "scale1.5",
- "presenter": "legacy",
- "scenario": "clear",
- "seconds": 4.0,
- "commits": 251,
- "instructions_per_commit": 672229.1474103585,
- "scene_commit_cpu": 0.2116663386454183,
- "projection_cpu": 0.045393533864541834,
- "glass_cpu": 0.03507880876494024,
- "gpu_elapsed": 0.23832874900398407,
- "cpu_frame": 0.500760764940239,
- "rss_kb": 135444,
- "rss_anon_kb": 46268
- },
- {
- "config": "scale1.5",
- "presenter": "legacy",
- "scenario": "glass",
- "seconds": 4.0,
- "commits": 246,
- "instructions_per_commit": 1171195.7398373983,
- "scene_commit_cpu": 0.24253202845528454,
- "projection_cpu": 0.04518690650406504,
- "glass_cpu": 0.3897848089430894,
- "gpu_elapsed": 0.6674409428571428,
- "cpu_frame": 0.885403349593496,
- "rss_kb": 135520,
- "rss_anon_kb": 46344
- },
- {
- "config": "scale1.5",
- "presenter": "owned",
- "scenario": "clear",
- "seconds": 4.0,
- "commits": 251,
- "instructions_per_commit": 662880.749003984,
- "scene_commit_cpu": 0.20792909960159361,
- "projection_cpu": 0.04397702390438247,
- "glass_cpu": 0.03456512749003984,
- "gpu_elapsed": 0.23085427490039842,
- "cpu_frame": 0.4938753027888446,
- "rss_kb": 136712,
- "rss_anon_kb": 47232
- },
- {
- "config": "scale1.5",
- "presenter": "owned",
- "scenario": "glass",
- "seconds": 4.0,
- "commits": 246,
- "instructions_per_commit": 1152271.0894308942,
- "scene_commit_cpu": 0.24533689024390246,
- "projection_cpu": 0.04155778861788618,
- "glass_cpu": 0.37083925609756097,
- "gpu_elapsed": 0.6474109105691056,
- "cpu_frame": 0.854627894308943,
- "rss_kb": 136800,
- "rss_anon_kb": 47320
- },
- {
- "config": "mixed",
- "presenter": "owned",
- "scenario": "clear",
- "seconds": 4.0,
- "commits": 252,
- "instructions_per_commit": 837821.126984127,
- "scene_commit_cpu": 0.099363203187251,
- "projection_cpu": 0.0330974641434263,
- "glass_cpu": 0.03351293824701195,
- "gpu_elapsed": 0.12996317131474103,
- "cpu_frame": 0.33202451992031873,
- "rss_kb": 138056,
- "rss_anon_kb": 48632
- },
- {
- "config": "mixed",
- "presenter": "owned",
- "scenario": "glass",
- "seconds": 4.0,
- "commits": 494,
- "instructions_per_commit": 747097.1740890688,
- "scene_commit_cpu": 0.163378463562753,
- "projection_cpu": 0.030401544534412954,
- "glass_cpu": 0.2085121923076923,
- "gpu_elapsed": 0.40654689676113365,
- "cpu_frame": 0.5419539109311741,
- "rss_kb": 138060,
- "rss_anon_kb": 48636
- },
- {
- "config": "mixed",
- "presenter": "legacy",
- "scenario": "clear",
- "seconds": 4.0,
- "commits": 252,
- "instructions_per_commit": 842943.2063492064,
- "scene_commit_cpu": 0.09717474451097804,
- "projection_cpu": 0.03340428942115769,
- "glass_cpu": 0.035519974051896205,
- "gpu_elapsed": 0.12460765668662675,
- "cpu_frame": 0.33707716966067863,
- "rss_kb": 136136,
- "rss_anon_kb": 46592
- },
- {
- "config": "mixed",
- "presenter": "legacy",
- "scenario": "glass",
- "seconds": 4.0,
- "commits": 492,
- "instructions_per_commit": 754149.7073170731,
- "scene_commit_cpu": 0.15475823780487805,
- "projection_cpu": 0.03213170325203252,
- "glass_cpu": 0.21415238414634147,
- "gpu_elapsed": 0.4035021605691057,
- "cpu_frame": 0.5447543048780489,
- "rss_kb": 136384,
- "rss_anon_kb": 46840
- },
- {
- "config": "mixed",
- "presenter": "legacy",
- "scenario": "clear",
- "seconds": 4.0,
- "commits": 252,
- "instructions_per_commit": 826420.9365079365,
- "scene_commit_cpu": 0.09563790039840638,
- "projection_cpu": 0.03377772908366534,
- "glass_cpu": 0.032303141434262946,
- "gpu_elapsed": 0.12164455378486055,
- "cpu_frame": 0.3237160896414343,
- "rss_kb": 135948,
- "rss_anon_kb": 46688
- },
- {
- "config": "mixed",
- "presenter": "legacy",
- "scenario": "glass",
- "seconds": 4.0,
- "commits": 492,
- "instructions_per_commit": 749202.2845528455,
- "scene_commit_cpu": 0.15321299796747967,
- "projection_cpu": 0.032111424796747966,
- "glass_cpu": 0.21430267073170733,
- "gpu_elapsed": 0.40014873373983745,
- "cpu_frame": 0.5395592906504065,
- "rss_kb": 135992,
- "rss_anon_kb": 46732
- },
- {
- "config": "mixed",
- "presenter": "owned",
- "scenario": "clear",
- "seconds": 4.0,
- "commits": 252,
- "instructions_per_commit": 844995.2698412698,
- "scene_commit_cpu": 0.09796875896414343,
- "projection_cpu": 0.03212557370517928,
- "glass_cpu": 0.03442500597609562,
- "gpu_elapsed": 0.12853803784860557,
- "cpu_frame": 0.3313341932270916,
- "rss_kb": 137096,
- "rss_anon_kb": 47504
- },
- {
- "config": "mixed",
- "presenter": "owned",
- "scenario": "glass",
- "seconds": 4.0,
- "commits": 492,
- "instructions_per_commit": 749970.837398374,
- "scene_commit_cpu": 0.16540483130081302,
- "projection_cpu": 0.03105710569105691,
- "glass_cpu": 0.21008673780487805,
- "gpu_elapsed": 0.420168093495935,
- "cpu_frame": 0.5488979349593496,
- "rss_kb": 137096,
- "rss_anon_kb": 47504
- }
- ],
- "cleanup_comparison": {
- "order": [
- "before",
- "after",
- "after",
- "before"
- ],
- "description": "Owned renderer before/after shader cleanup and empty-clip early returns, same workload and compiler.",
- "runs": [
- {
- "config": "scale1",
- "presenter": "owned",
- "label": "before",
- "scenario": "clear",
- "seconds": 4.0,
- "commits": 252,
- "instructions_per_commit": 635584.4285714285,
- "scene_commit_cpu": 0.1988471150793651,
- "projection_cpu": 0.0406925753968254,
- "glass_cpu": 0.03458315873015873,
- "gpu_elapsed": 0.22284100396825396,
- "cpu_frame": 0.4759889484126984,
- "rss_kb": 133748,
- "rss_anon_kb": 44468
- },
- {
- "config": "scale1",
- "presenter": "owned",
- "label": "before",
- "scenario": "glass",
- "seconds": 4.0,
- "commits": 246,
- "instructions_per_commit": 1094297.463414634,
- "scene_commit_cpu": 0.22747733739837397,
- "projection_cpu": 0.0408034918699187,
- "glass_cpu": 0.37829310975609753,
- "gpu_elapsed": 0.6487684308943089,
- "cpu_frame": 0.8499870406504065,
- "rss_kb": 133748,
- "rss_anon_kb": 44468
- },
- {
- "config": "scale1",
- "presenter": "owned",
- "label": "after",
- "scenario": "clear",
- "seconds": 4.0,
- "commits": 252,
- "instructions_per_commit": 635720.1587301587,
- "scene_commit_cpu": 0.19824430555555556,
- "projection_cpu": 0.04205985317460317,
- "glass_cpu": 0.033859603174603174,
- "gpu_elapsed": 0.2247900357142857,
- "cpu_frame": 0.48184436507936507,
- "rss_kb": 133040,
- "rss_anon_kb": 43600
- },
- {
- "config": "scale1",
- "presenter": "owned",
- "label": "after",
- "scenario": "glass",
- "seconds": 4.0,
- "commits": 247,
- "instructions_per_commit": 1091156.0809716599,
- "scene_commit_cpu": 0.21396387854251012,
- "projection_cpu": 0.03845520242914979,
- "glass_cpu": 0.3593137287449393,
- "gpu_elapsed": 0.597599943319838,
- "cpu_frame": 0.8039575789473684,
- "rss_kb": 133040,
- "rss_anon_kb": 43600
- },
- {
- "config": "scale1",
- "presenter": "owned",
- "label": "after",
- "scenario": "clear",
- "seconds": 4.0,
- "commits": 251,
- "instructions_per_commit": 638189.4501992032,
- "scene_commit_cpu": 0.1998214262948207,
- "projection_cpu": 0.04212322310756972,
- "glass_cpu": 0.034868362549800795,
- "gpu_elapsed": 0.2231615418326693,
- "cpu_frame": 0.4832758605577689,
- "rss_kb": 133472,
- "rss_anon_kb": 44120
- },
- {
- "config": "scale1",
- "presenter": "owned",
- "label": "after",
- "scenario": "glass",
- "seconds": 4.0,
- "commits": 246,
- "instructions_per_commit": 1100146.780487805,
- "scene_commit_cpu": 0.2248186056910569,
- "projection_cpu": 0.04181669918699187,
- "glass_cpu": 0.37039569918699183,
- "gpu_elapsed": 0.6232130894308944,
- "cpu_frame": 0.8402836341463414,
- "rss_kb": 133472,
- "rss_anon_kb": 44120
- },
- {
- "config": "scale1",
- "presenter": "owned",
- "label": "before",
- "scenario": "clear",
- "seconds": 4.0,
- "commits": 252,
- "instructions_per_commit": 635524.0476190476,
- "scene_commit_cpu": 0.19454619047619048,
- "projection_cpu": 0.04135748809523809,
- "glass_cpu": 0.033575904761904765,
- "gpu_elapsed": 0.22382585714285713,
- "cpu_frame": 0.46931246428571427,
- "rss_kb": 133340,
- "rss_anon_kb": 43948
- },
- {
- "config": "scale1",
- "presenter": "owned",
- "label": "before",
- "scenario": "glass",
- "seconds": 4.0,
- "commits": 246,
- "instructions_per_commit": 1097231.6585365853,
- "scene_commit_cpu": 0.22173964227642276,
- "projection_cpu": 0.041729028455284554,
- "glass_cpu": 0.372185662601626,
- "gpu_elapsed": 0.6144221910569105,
- "cpu_frame": 0.834636,
- "rss_kb": 133340,
- "rss_anon_kb": 43948
- }
- ]
- },
- "cost_gate": "open: remaining anonymous RSS and output-build wall-time increases; hardware qualification unchanged",
- "validation": {
- "goldens": {
- "compared": 16,
- "max_channel_difference": 0,
- "taskbar_masked": true
- },
- "passed": [
- "Debug build",
- "ReleaseSafe build",
- "zig build test",
- "test-scene-pass Debug",
- "test-scene-pass ReleaseSafe",
- "test-glass",
- "capture.py",
- "explicit_sync.py",
- "direct_scanout.py",
- "presentation_time.py",
- "screenshot_regressions.py"
- ]
- }
- },
- "frame_block_ab": {
- "date": "2026-10-09",
- "method": "Scratch-patched copy of the working tree (never committed): one process builds each output frame with the legacy or owned presenter in blocks of 32 frames, discarding the first 6 of each block; thread CPU time and wall time of the build call, wall time of build+commit and GPU elapsed (timestamp pairs, tagged through the sample generation) are collected per presenter, 3000 samples each, then mean/median/p10/p90. Same process and thermal/power state for both arms; AC online throughout, battery Charging. Summary values in ns.",
- "build": "ReleaseSafe, P-core affinity, Intel renderD128, platform_profile performance, schedutil",
- "before_early_reject": {
- "scale1/clear": {
- "build_cpu": {
- "n": 3000,
- "legacy": {
- "mean": 212552,
- "median": 207046,
- "p10": 160852,
- "p90": 266524
- },
- "owned": {
- "mean": 207794,
- "median": 204775,
- "p10": 157587,
- "p90": 263899
- }
- },
- "build_wall": {
- "n": 3000,
- "legacy": {
- "mean": 218729,
- "median": 212648,
- "p10": 163772,
- "p90": 274318
- },
- "owned": {
- "mean": 213882,
- "median": 209531,
- "p10": 159955,
- "p90": 270969
- }
- },
- "commit_wall": {
- "n": 3000,
- "legacy": {
- "mean": 231092,
- "median": 225272,
- "p10": 172824,
- "p90": 289339
- },
- "owned": {
- "mean": 226010,
- "median": 221979,
- "p10": 168286,
- "p90": 286634
- }
- },
- "gpu": {
- "n": 3000,
- "legacy": {
- "mean": 266199,
- "median": 270729,
- "p10": 158542,
- "p90": 363125
- },
- "owned": {
- "mean": 256616,
- "median": 258750,
- "p10": 150416,
- "p90": 350417
- }
- }
- },
- "scale1/glass": {
- "build_cpu": {
- "n": 3000,
- "legacy": {
- "mean": 242383,
- "median": 247983,
- "p10": 171947,
- "p90": 293601
- },
- "owned": {
- "mean": 241273,
- "median": 249375,
- "p10": 171910,
- "p90": 300815
- }
- },
- "build_wall": {
- "n": 3000,
- "legacy": {
- "mean": 249139,
- "median": 254304,
- "p10": 174720,
- "p90": 304262
- },
- "owned": {
- "mean": 247946,
- "median": 255593,
- "p10": 174636,
- "p90": 311318
- }
- },
- "commit_wall": {
- "n": 3000,
- "legacy": {
- "mean": 260992,
- "median": 266304,
- "p10": 184255,
- "p90": 319182
- },
- "owned": {
- "mean": 259461,
- "median": 266826,
- "p10": 183181,
- "p90": 325469
- }
- },
- "gpu": {
- "n": 3000,
- "legacy": {
- "mean": 708663,
- "median": 714844,
- "p10": 495261,
- "p90": 885312
- },
- "owned": {
- "mean": 689666,
- "median": 698906,
- "p10": 475677,
- "p90": 880990
- }
- }
- },
- "scale1.5/clear": {
- "build_cpu": {
- "n": 3000,
- "legacy": {
- "mean": 208546,
- "median": 204035,
- "p10": 159866,
- "p90": 266148
- },
- "owned": {
- "mean": 204422,
- "median": 202309,
- "p10": 156971,
- "p90": 260897
- }
- },
- "build_wall": {
- "n": 3000,
- "legacy": {
- "mean": 214345,
- "median": 210393,
- "p10": 162282,
- "p90": 274082
- },
- "owned": {
- "mean": 210197,
- "median": 208145,
- "p10": 159895,
- "p90": 268399
- }
- },
- "commit_wall": {
- "n": 3000,
- "legacy": {
- "mean": 225889,
- "median": 222153,
- "p10": 170943,
- "p90": 288121
- },
- "owned": {
- "mean": 221598,
- "median": 219170,
- "p10": 168573,
- "p90": 282991
- }
- },
- "gpu": {
- "n": 3000,
- "legacy": {
- "mean": 253694,
- "median": 256980,
- "p10": 149375,
- "p90": 358333
- },
- "owned": {
- "mean": 247249,
- "median": 250625,
- "p10": 144844,
- "p90": 348750
- }
- }
- },
- "scale1.5/glass": {
- "build_cpu": {
- "n": 3000,
- "legacy": {
- "mean": 228728,
- "median": 229378,
- "p10": 162833,
- "p90": 298205
- },
- "owned": {
- "mean": 239943,
- "median": 240894,
- "p10": 175946,
- "p90": 309888
- }
- },
- "build_wall": {
- "n": 3000,
- "legacy": {
- "mean": 234802,
- "median": 234799,
- "p10": 165243,
- "p90": 308805
- },
- "owned": {
- "mean": 246022,
- "median": 245874,
- "p10": 179714,
- "p90": 318798
- }
- },
- "commit_wall": {
- "n": 3000,
- "legacy": {
- "mean": 245759,
- "median": 245599,
- "p10": 173498,
- "p90": 323811
- },
- "owned": {
- "mean": 257049,
- "median": 256503,
- "p10": 188395,
- "p90": 332391
- }
- },
- "gpu": {
- "n": 3000,
- "legacy": {
- "mean": 674066,
- "median": 675781,
- "p10": 458229,
- "p90": 884271
- },
- "owned": {
- "mean": 681602,
- "median": 678490,
- "p10": 473386,
- "p90": 881355
- }
- }
- },
- "mixed/clear": {
- "build_cpu": {
- "n": 3000,
- "legacy": {
- "mean": 200126,
- "median": 201064,
- "p10": 144795,
- "p90": 257703
- },
- "owned": {
- "mean": 198982,
- "median": 202566,
- "p10": 143900,
- "p90": 258933
- }
- },
- "build_wall": {
- "n": 3000,
- "legacy": {
- "mean": 205772,
- "median": 205208,
- "p10": 147646,
- "p90": 266249
- },
- "owned": {
- "mean": 204546,
- "median": 206861,
- "p10": 146232,
- "p90": 266703
- }
- },
- "commit_wall": {
- "n": 3000,
- "legacy": {
- "mean": 215064,
- "median": 214864,
- "p10": 154415,
- "p90": 278460
- },
- "owned": {
- "mean": 213740,
- "median": 216095,
- "p10": 152819,
- "p90": 278512
- }
- },
- "gpu": {
- "n": 3000,
- "legacy": {
- "mean": 143666,
- "median": 73697,
- "p10": 10677,
- "p90": 333282
- },
- "owned": {
- "mean": 143448,
- "median": 71615,
- "p10": 10677,
- "p90": 325052
- }
- }
- },
- "mixed/glass": {
- "build_cpu": {
- "n": 3000,
- "legacy": {
- "mean": 152864,
- "median": 147933,
- "p10": 109120,
- "p90": 197262
- },
- "owned": {
- "mean": 160653,
- "median": 156632,
- "p10": 108470,
- "p90": 218919
- }
- },
- "build_wall": {
- "n": 3000,
- "legacy": {
- "mean": 156483,
- "median": 152803,
- "p10": 110358,
- "p90": 206188
- },
- "owned": {
- "mean": 164640,
- "median": 158869,
- "p10": 109818,
- "p90": 227827
- }
- },
- "commit_wall": {
- "n": 3000,
- "legacy": {
- "mean": 162179,
- "median": 157512,
- "p10": 112654,
- "p90": 215533
- },
- "owned": {
- "mean": 170488,
- "median": 163964,
- "p10": 112202,
- "p90": 237331
- }
- },
- "gpu": {
- "n": 3000,
- "legacy": {
- "mean": 418605,
- "median": 341979,
- "p10": 179479,
- "p90": 731042
- },
- "owned": {
- "mean": 427348,
- "median": 341094,
- "p10": 180729,
- "p90": 751407
- }
- }
- }
- },
- "after_early_reject_glass_only": {
- "scale1/glass": {
- "build_cpu": {
- "n": 3000,
- "legacy": {
- "mean": 221664,
- "median": 218824,
- "p10": 162926,
- "p90": 281799
- },
- "owned": {
- "mean": 223252,
- "median": 217264,
- "p10": 168950,
- "p90": 288033
- }
- },
- "build_wall": {
- "n": 3000,
- "legacy": {
- "mean": 227339,
- "median": 223333,
- "p10": 166284,
- "p90": 292718
- },
- "owned": {
- "mean": 229208,
- "median": 222854,
- "p10": 172156,
- "p90": 295339
- }
- },
- "commit_wall": {
- "n": 3000,
- "legacy": {
- "mean": 238886,
- "median": 235001,
- "p10": 175123,
- "p90": 307256
- },
- "owned": {
- "mean": 240482,
- "median": 234330,
- "p10": 180687,
- "p90": 310282
- }
- },
- "gpu": {
- "n": 3000,
- "legacy": {
- "mean": 666862,
- "median": 656458,
- "p10": 435157,
- "p90": 883594
- },
- "owned": {
- "mean": 661031,
- "median": 644792,
- "p10": 443698,
- "p90": 878177
- }
- }
- },
- "scale1.5/glass": {
- "build_cpu": {
- "n": 3000,
- "legacy": {
- "mean": 238016,
- "median": 248011,
- "p10": 174542,
- "p90": 295301
- },
- "owned": {
- "mean": 243054,
- "median": 257174,
- "p10": 179981,
- "p90": 301588
- }
- },
- "build_wall": {
- "n": 3000,
- "legacy": {
- "mean": 244099,
- "median": 254445,
- "p10": 178844,
- "p90": 303034
- },
- "owned": {
- "mean": 249511,
- "median": 261218,
- "p10": 183755,
- "p90": 311291
- }
- },
- "commit_wall": {
- "n": 3000,
- "legacy": {
- "mean": 255915,
- "median": 266659,
- "p10": 188105,
- "p90": 317854
- },
- "owned": {
- "mean": 261463,
- "median": 273314,
- "p10": 192734,
- "p90": 325952
- }
- },
- "gpu": {
- "n": 3000,
- "legacy": {
- "mean": 694013,
- "median": 704375,
- "p10": 495104,
- "p90": 877917
- },
- "owned": {
- "mean": 696177,
- "median": 711198,
- "p10": 489427,
- "p90": 877553
- }
- }
- },
- "mixed/glass": {
- "build_cpu": {
- "n": 3000,
- "legacy": {
- "mean": 148344,
- "median": 147636,
- "p10": 105553,
- "p90": 193307
- },
- "owned": {
- "mean": 154879,
- "median": 154345,
- "p10": 105653,
- "p90": 210917
- }
- },
- "build_wall": {
- "n": 3000,
- "legacy": {
- "mean": 152080,
- "median": 151505,
- "p10": 106418,
- "p90": 202533
- },
- "owned": {
- "mean": 158527,
- "median": 156337,
- "p10": 106854,
- "p90": 218964
- }
- },
- "commit_wall": {
- "n": 3000,
- "legacy": {
- "mean": 157601,
- "median": 156940,
- "p10": 108710,
- "p90": 211892
- },
- "owned": {
- "mean": 164109,
- "median": 160681,
- "p10": 109243,
- "p90": 228755
- }
- },
- "gpu": {
- "n": 3000,
- "legacy": {
- "mean": 401370,
- "median": 317083,
- "p10": 177344,
- "p90": 708802
- },
- "owned": {
- "mean": 412348,
- "median": 319635,
- "p10": 180625,
- "p90": 719792
- }
- }
- }
- }
- },
- "memory_attribution": {
- "date": "2026-10-09",
- "startup_delta_anon_kib": 440,
- "trace": "RssAnon at session up / 3 windows / damage client +1..+21 s, owned vs legacy twice each (scale 1): owned-legacy = +440, +448, +448, ... +448 KiB; constant for 20 s of 60 fps damage (no growth). Legacy-vs-legacy session spread alone is about 430 KiB.",
- "in_process": "scene_pass.c renderer_create in an otherwise idle GLES2 process: solid +72..80, 2D texture +100..104, external-OES +104..132, full create (programs + VAO/VBO) about +400..412 KiB; 50 further passes add 4 KiB."
- },
- "gate_decision": {
- "date": "2026-10-09",
- "decided_by": "user (option A: explicit tolerance, no clip batching)",
- "tolerance": {
- "build_cpu_pct": 5,
- "gpu_elapsed_pct": 5,
- "instructions_per_frame_pct": 3,
- "anon_memory_startup_mib": 0.5,
- "growth": "none under sustained damage"
- },
- "worst_measured": {
- "build_cpu_pct": 4.4,
- "gpu_elapsed_pct": 2.7,
- "instructions_ratio_range": [
- 0.973,
- 1.009
- ],
- "anon_memory_mib": 0.44
- }
- }
-}
diff --git a/docs/plans/scene-graph-stage3.md b/docs/plans/scene-graph-stage3.md
deleted file mode 100644
index 4967e3e..0000000
--- a/docs/plans/scene-graph-stage3.md
+++ /dev/null
@@ -1,452 +0,0 @@
-# Scene graph plan, stage 3: owned output pass
-
-Status: **done**, 2026-10-09; hardware checklist passed 2026-10-11 except hotplug, not run (no second display), and scanout unconfirmed; see the checklist. Stages 0–2 are
-complete. The owned radius-zero pass renders real outputs and captures and meets
-the stage 3 cost tolerance (see **Gate decision**). The legacy presenter remains
-the default; only a real KMS session can still qualify plane scanout, out-timeline
-release and hotplug. Clipping is stage 4.
-
-To select the new path, add `scene_renderer = "owned"` to `[compositor]` in the
-config and restart the compositor. `"legacy"` selects the old path. This temporary
-key requires a restart (reload reports that fact); it introduces no production
-environment switch. The owned path requires GLES2 and fails initialization if it
-cannot create its renderer.
-
-## Output integration
-
-`src/scene_output.c` builds output state using the graph and the owned pass:
-
-* Projection exposes both traversal directions. World items come from the
- resolved paint lists; shell, layer, IME, taskbar and lock nodes are resolved with
- identity layout transforms. Moving a view node cannot become a second source
- of world geometry. Glass publishes its raster against its resolved target's
- bounds after updating, including when the blur is held.
-* Top-to-bottom culling rejects off-output and fully covered items before copying
- their content. Draws run in reverse order. Visible and opaque regions control
- damage scissors, the black clear and whether texture blending can be disabled.
-* The swapchain and its damage ring are shared with the retained scene adapter.
- The builder rotates damage for the acquired buffer, including when capture
- runs between frames. Failed rendering or output commits damage the output
- fully for retry. There are no new timers or idle wakeups.
-* A fullscreen opaque surface can scan out after buffer/colour/transform checks
- and `wlr_output_test_state`. Composition signals the input timeline, waits on
- client acquire points, emits sample/release feedback after successful GPU
- submission, and draws software cursors into the same pass.
-* `Server.buildOutputState` is the single selection point for frames, IPC pixel
- reads and screenshots. `Output.commitFrameState` remains the only compositor
- output commit path. Isolated screenshots resolve their temporary source
- visibility changes before capturing and again before restoring the screen.
-* `WindowCaptureSource` uses the selected drawing backend with its own swapchain
- and `ReadFence`. Its source-only traversal remains independent of output
- occlusion, so an off-screen or covered window cannot capture its neighbours.
-
-The retained adapter still owns surface lifecycle, enter/leave, preferred scale,
-primary output, frame pacing, damage notifications and buffer/texture lifetimes.
-The output builder shares its texture cache rather than importing every shm
-client again or holding another buffer lock. Removing that adapter is stage 6;
-this change does not reimplement Wayland surface semantics. Per-surface dmabuf
-feedback tranches remain absent, as in the stage 0 inventory.
-
-For parity, output placement retains the legacy **layout-edge snap followed by
-output-scale/transform snapping**. It reads graph edges, never view positions.
-Eliminating the intermediate integer snap would change pixels at fractional
-scale and belongs to a separate geometry change.
-
-## Drawing backend
-
-`src/scene_pass.c` owns the GLES2 programs and drawing on wlroots' context and
-buffer FBO. `scene_pass.h` exposes a renderer and `rediwm_scene_pass_begin`, which
-returns a `wlr_render_pass`. The interface reuses wlroots' draw option types and
-can accept its software-cursor helper; it does not call wlroots' GLES2 pass to
-draw. The stage 1 SDF and backdrop primitives remain in the spike until stages 4
-and 5 need them.
-
-Implemented:
-
-* Premultiplied solid, RGBA, RGBX and external-OES programs; opacity and disabled
- blending; all eight texture transforms, fractional source crops, nearest and
- bilinear filters.
-* Disjoint damage scissors and empty damage. Destination rectangles are already
- in buffer pixels: this layer neither derives geometry nor accumulates damage.
-* GPU acquire waits through an imported native fence, and a native release fence
- imported into the supplied timeline. One flush per successful pass. A failed
- pass finishes outstanding reads before returning failure, because callers do
- not register release points for a failed submission.
-* Destination buffer locking, timeline references, program cleanup and GL/EGL
- state restoration, including vertex state, separate blend functions/equations,
- scissor box and active texture unit. A private VAO/VBO avoids querying every
- vertex attribute per pass; drivers without that extension use a saved/restored
- client array. UV corners are uniforms, so both paths preserve nearest-filter
- boundary values exactly. Both paths are exercised by the GPU fixture. Texture
- filters are set per draw, as in wlroots. Empty clips skip GL setup and acquire
- waits entirely. Linked shaders are detached before deletion, allowing the
- driver to release their source and compiler IR while keeping the executable.
-
-Only one owned pass may be active per renderer. The caller must submit it even
-after a draw fails. Output colour transforms and wlroots render timers are
-rejected rather than silently ignored; GLES2 does not support the former, and
-the compositor's existing `gpu_timing.c` brackets the whole frame independently.
-
-## Verification
-
-`zig build test-scene-pass` is a noninstalled GPU fixture. Use
-`WLR_RENDER_DRM_DEVICE=/dev/dri/renderD128` on the baseline machine; automatic
-device selection there can choose a renderer which cannot import the allocator's
-buffer into an FBO. The test requires GLES2 and a compatible render node, like
-`test-pass-spike`.
-
-On that Intel render node, Debug and ReleaseSafe pass:
-
-* 128 RGBA/RGBX × transform × filter × crop × alpha/damage cases compared to
- wlroots on the same buffers: **maximum channel difference 0**. Repeated after
- exercising state restoration and failure recovery.
-* Partial repaint preserves every pixel outside two disjoint rectangles; empty
- damage changes nothing. Disabled blending matches wlroots too.
-* A real dmabuf EGLImage bound to an external-OES texture matches wlroots' import
- through all transforms and both filters, within one channel level. The fixture
- forces the external draw routine because this driver's RGB import normally
- selects 2D.
-* **Driver-converted YUV (added 2026-10-09).** A linear NV12 dmabuf, two planes of
- one buffer with the chroma plane on a page boundary and known Y/UV gradients,
- is imported by wlroots as a video client's would be. Mesa reports it
- external-only (the test asserts the texture target and that it has no alpha),
- and wlroots' pass and ours produce the same pixels (**maximum difference <= 1,
- all 8 transforms x both filters**); the image is checked to be non-blank. Mesa's
- gbm cannot allocate NV12 on this node, so the fixture allocates a linear R8
- buffer 1.5x as tall and describes it as NV12. This covers the external program
- with real YUV on the Intel/iris node only: other drivers' conversion and
- tiled/compressed modifiers are not exercised. Needs `gbm` (linked by the step).
-* Deliberately nondefault GL state survives a pass; subsequent wlroots passes
- still draw correctly.
-* An acquire point and release point complete on a real DRM timeline. An
- unavailable acquire point fails the pass, then a new pass succeeds. The
- `drmSyncobjTransfer failed: Invalid argument` line is expected from this
- negative test. Delayed producer work and real client release remain integration
- gates, not claims of this fixture.
-
-Debug and ReleaseSafe compositor builds, `zig build test`, `test-glass` and
-`test-pass-spike` also pass. The existing presenter passes `direct_scanout.py`
-(XRGB and opaque ARGB scan out; translucent ARGB composites) and
-`presentation_time.py` (v1 compatibility and v2 feedback/projection/output).
-Those were the initial drawing-backend checks. The live integration results below
-use the new selector.
-
-## Live integration checks
-
-The first full ReleaseSafe comparison produced **16/16 bit-identical screenshots**
-(maximum channel difference 0) against the legacy presenter in the same binary:
-scale 1, scale 1.5 and mixed outputs, ordinary windows, fullscreen, zoom 70% and
-minimum zoom. Both presenters settle at zero idle commits, including mixed-scale
-glass. The final culling/GL-state optimizations were rechecked against all 16
-images: again **maximum difference 0**.
-
-Passing on the owned path: direct scanout (XRGB, opaque ARGB, translucent ARGB
-control), presentation-time v1/v2, mixed output scale/reload, output destruction,
-layer lifecycle, lock isolation (single/multiple outputs and lock sequencing),
-capture (SHM, dmabuf, window isolation, resize/destruction, screenshot coexistence),
-screenshot regressions, popup constraints, focus zoom, chrome appearance, panel
-damage, desktop damage and single-pixel buffers. The real Vulkan client completes
-600 explicit-sync frames while overlapping taskbar glass.
-
-Fixture corrections needed to exercise this path:
-
-* Python launchers accept `REDIWM_TEST_SCENE_RENDERER=owned` by writing the config
- key; the compositor never reads that variable. Shared launchers honour
- `REDIWM_TEST_RENDERER` when no renderer is explicitly supplied.
-* Capture tests accept/decode the advertised RGBA or BGRA format and run with
- GLES2; colour checks disable window-open animation.
-* Single-pixel tests sample relative to the client box with the effective window
- and camera scale, rather than sampling the titlebar. They disable animation.
-* The sync test used the nonexistent output `height` field, defaulted to 1080,
- and moved vkcube to y=802 on a 720-high output. A completely hidden client
- correctly stopped getting frame callbacks. It now uses `logical_height`.
- The original timeout reproduced on both legacy and the `958422f` HEAD worktree;
- with the fixture corrected the owned renderer completes the test.
-
-Broader suite failures were compared with the legacy path and a worktree of
-`958422f`: the lock protocol test expects `finished` after a rejected client has
-already exited; fractional workspace focus-border sampling can include the
-neighbour's red border; desktop zoom expects a different client input coordinate;
-Xwayland expects titlebar height 41 but gets 35; screencast expects a removed
-host-bus log message. These also fail on HEAD. `glass_hold` passes its mixed-scale
-idle gate but its exact drag/reference comparison fails with the legacy path too;
-HEAD also fails the drag/reference fixture. These suites are not claimed as passes.
-
-The normal `zig build test` passes. An additional ReleaseSafe unit sweep passes
-800/801 tests: the shared D-Bus test `signal handler registration, duplicate
-prevention, and unregistration` fails. `zig build test-dbus
--Doptimize=ReleaseSafe` reproduces that same failure in the HEAD worktree; the
-Debug suite and the owned-pass GPU tests in both build modes pass.
-
-## Cost gate: still open
-
-After early culling, caching redundant per-draw GL state and introducing the
-private VAO/VBO, a separate paired
-run used owned/legacy/legacy/owned for each output configuration, with four
-seconds each of a small repaint clear of glass and under glass. No builds or
-other agent integration suites ran during that comparison. The host session was
-still running; power policy was balanced/schedutil/balance_power on AC, so these
-times are not comparable to the original performance-profile stage 0 timings.
-Instructions are normalized per committed frame. Raw paired measurements and
-conditions: [scene-graph-stage3-results.json](scene-graph-stage3-results.json).
-
-| Configuration / repaint | Instructions owned/legacy | Output build, legacy → owned | Whole frame, legacy → owned |
-|---|---:|---:|---:|
-| Scale 1 / clear | 0.997 | 0.194 → 0.206 ms | 0.464 → 0.498 ms |
-| Scale 1 / glass | 0.973 | 0.213 → 0.234 ms | 0.807 → 0.884 ms |
-| Mixed / clear | 1.009 | 0.097 → 0.098 ms | 0.331 → 0.332 ms |
-| Mixed / glass | 1.006 | 0.155 → 0.167 ms | 0.547 → 0.553 ms |
-
-Anonymous RSS increased by 1.1–1.4 MiB in these pairs. The unchanged projection
-and glass control timers also drifted by 8–12% at scale 1, so those wall times
-alone do not establish a renderer regression. Instructions per frame are now
-close to flat or lower, but the observed output-build delta of roughly 1–21 µs
-and small memory increase mean the plan's **at-or-below baseline gate is not yet
-established**. Keep legacy as the default. The next step is a profile of output
-assembly, GL setup and retained memory, followed by a paired recheck; these
-figures do not justify marking stage 3 complete or silently relaxing the gate.
-
-### Follow-up: shader lifetime and reproducible pairs
-
-A cycles profile of a small repaint clear of glass put about 28% of the sampled
-compositor work under output assembly: roughly 11% in submission, 5% in pass
-setup, and 2% in graph traversal/collection. Driver work dominates those stacks;
-they do not support replacing graph traversal with another geometry cache.
-
-Linked shader objects were still attached when deleted, retaining source and
-compiler IR until program destruction. The pass now detaches them after linking
-and skips GL setup and acquire waits for empty clips. A before/after/after/before
-comparison at scale 1 reduced mean anonymous RSS by **348 KiB**. Instructions
-were effectively unchanged (ratios 1.002 clear and 1.000 under glass), so this is
-primarily a resource-lifetime fix, not a claim of faster frames.
-
-The paired workload now lives in `tests/scene_baseline.py` instead of a scratch
-script. Reproduce it after a ReleaseSafe build, without concurrent builds/tests:
-
-```sh
-WLR_RENDER_DRM_DEVICE=/dev/dri/renderD128 python3 tests/scene_baseline.py \
- --modes paired --configs scale1,scale1.5,mixed --out /tmp/scene-cost.json
-python3 tests/scene_baseline.py --report /tmp/scene-cost.json
-```
-
-It runs owned/legacy/legacy/owned per configuration, saves every measurement and
-power condition, and normalizes instructions per committed frame. Counters and
-frame timers are enabled together, so these are paired comparisons, not figures
-to compare against the original `clean` baseline. A fresh run on the same Intel
-render node, balanced policy and AC produced:
-
-| Configuration / repaint | Instructions owned/legacy | Output build, legacy → owned | Anonymous RSS delta |
-|---|---:|---:|---:|
-| Scale 1 / clear | 0.996 | 0.194 → 0.197 ms | +810 KiB |
-| Scale 1 / glass | 0.974 | 0.224 → 0.238 ms | +798 KiB |
-| Scale 1.5 / clear | 0.985 | 0.211 → 0.212 ms | +1040 KiB |
-| Scale 1.5 / glass | 0.986 | 0.241 → 0.251 ms | +1048 KiB |
-| Mixed / clear | 1.008 | 0.096 → 0.099 ms | +1428 KiB |
-| Mixed / glass | 0.996 | 0.154 → 0.164 ms | +1284 KiB |
-
-The `follow_up` section of [the results JSON](scene-graph-stage3-results.json)
-preserves both comparisons. The **cost gate remains open**: the small cleanup
-does not eliminate the retained-memory increase or establish wall-time parity.
-Legacy stays the default. Memory attribution, a drift-free A/B and NV12
-coverage followed on the same day: see the next section.
-
-Validation after the cleanup: Debug and ReleaseSafe builds, `zig build test`,
-the owned-pass GPU fixture in both modes, and `test-glass` pass. All **16/16
-goldens remain bit-identical** to legacy (the harness masks the taskbar).
-Owned-path capture, explicit sync, direct scanout, presentation time and screenshot
-regressions also pass. The benchmark's saved-result report was exercised against
-the complete paired run.
-
-### Follow-up: frame-by-frame A/B and memory attribution
-
-**Why another method.** The O-L-L-O sessions above cannot resolve a few
-microseconds: the two *legacy* sessions of one pair differ by up to 12 % in build
-time (0.205 vs 0.183 ms at scale 1 / clear) and the owned runs fall between them.
-The comparison below removes session drift by construction.
-
-**Method.** A throwaway patched copy of the working tree (never committed: it
-needs a selector hook that production must not carry) builds each output frame
-with the legacy or the owned presenter in blocks of 32 frames, drops the first
-six frames of every block, and records per presenter, 3000 samples each: thread
-CPU time and wall time of the build call, wall time of build + commit, and GPU
-elapsed (the timer's generation word carries the presenter tag). Both arms share
-the process, clocks, thermal and power state. ReleaseSafe, P-cores, Intel render
-node, AC online throughout. Raw statistics (mean, median, p10, p90) are in the
-`frame_block_ab` section of [the results JSON](scene-graph-stage3-results.json).
-The clear rows predate the damage early-out described below, which only removes
-work; the glass rows were re-run with it.
-
-| Config / repaint | Build CPU legacy → owned (mean) | Difference | GPU legacy → owned (mean) |
-|---|---:|---:|---:|
-| Scale 1 / clear | 212.6 → 207.8 µs | −2.2 % | 266 → 257 µs |
-| Scale 1 / glass | 221.7 → 223.3 µs | +0.7 % (+1.6 µs) | 667 → 661 µs |
-| Scale 1.5 / clear | 208.5 → 204.4 µs | −2.0 % | 254 → 247 µs |
-| Scale 1.5 / glass | 238.0 → 243.1 µs | **+2.1 % (+5.0 µs)** | 694 → 696 µs |
-| Mixed / clear | 200.1 → 199.0 µs | −0.6 % | 144 → 143 µs |
-| Mixed / glass | 148.3 → 154.9 µs | **+4.4 % (+6.5 µs)** | 401 → 412 µs |
-
-Absolute figures move between runs (the legacy arm itself went 242 → 222 µs at
-scale 1 / glass between two runs); only the within-run difference is meaningful.
-GPU time is a tie within its spread (p10–p90 covers roughly ±40 %). Build + commit
-wall time moves by the same amount as the build alone, so the commit path is
-unaffected.
-
-**Reading.** Owned is equal or faster for clear repaints at every scale and equal
-at scale 1 under glass. Under glass at fractional scale it costs **5–6 µs more per
-frame** (about 2–4 % of the build phase, under 1 % of whole-frame CPU). Before the
-early-out below the same cells read +4.9 % (+11.2 µs) and +5.1 % (+7.8 µs).
-
-**What the remaining gap is not.** Phase timers on an instrumented owned build
-(scale 1.5 / glass, about 250 µs with timer overhead): coverage collection 19 µs,
-pass preparation 26, the entry loop 95 (region arithmetic only about 7, GL calls
-about 71), submission 104. An `LD_PRELOAD` call counter over 10 s of the same
-workload (about 59 commits/s) found, per second, legacy vs owned: `glDrawArrays`
-1773 vs 1953, `glScissor` 0 vs 1480, uniform calls 7091 vs 6986, and per commit
-`eglMakeCurrent` 24 vs 26 and `glGet*` 9 vs 24. wlroots batches every clip
-rectangle of an entry into one client-array draw; the owned pass scissors and
-draws each rectangle, so multi-rectangle clips (more frequent once fractional
-rounding and the one-pixel expansion apply) cost about three extra draws and a
-couple of dozen scissors per commit. A microbenchmark rules out the context and
-state-query differences: a same-context `eglMakeCurrent` is about 100 ns, a bind
-and unbind pair about 550 ns and a `glGet*` about 6 ns. Closing the gap would mean
-streaming all rectangles of a clip through one vertex array, which changes the
-pass's vertex path and shader and puts the exactness fixture (128 cases at
-maximum difference 0) at risk for roughly 0.6 % of frame CPU; it was not done.
-
-**Change made.** `render_entry` rejected nothing before doing its region
-arithmetic. It now compares the entry's device box (two pixels of margin, covering
-the outward rounding of the scale and the one-pixel expansion) with the extents of
-the frame damage first. This is a pure early-out: the 16 goldens stay
-**bit-identical to legacy at tolerance 0** (scale 1, 1.5, mixed; same binary).
-
-Validation of this change, Debug and ReleaseSafe builds: `zig build test` (exit 0;
-the "failed command" lines are the build runner noting stderr from tests that feed
-invalid config on purpose, and both flagged binaries pass 74/74 and 186/186 when
-run directly) and `test-scene-pass` in both modes. On the owned path with GLES2
-these pass: `desktop_damage`, `panel_damage`, `single_pixel` (1x and 1.5x),
-`direct_scanout`, `presentation_time`, `explicit_sync`, `capture`,
-`screenshot_regressions`, `output_destroy`, `layer_lifecycle`,
-`popup_constraint`, `focus_zoom`, `appearance_chrome` (scale 1.5) and
-`output_scale`. `desktop_damage` and `panel_damage` take their scale as an
-argument, so their fractional-scale variants (`--scale 1.5`) were not run.
-`window_corners` is **flaky on both presenters** with the same fractional-scale
-focus-border assertion (the neighbour's red border enters the sampled logical
-pixel): the owned path failed in 3 of 5 runs and legacy in 2 of 3, at scale 1.25 or 1.5,
-with identical pixel tuples where the scales coincide. It
-is the known failure on HEAD, not a result of this change.
-
-**Memory.** The earlier +0.8–1.4 MiB per pair mixed a structural cost with
-session spread (two legacy sessions differ by about 0.43 MiB on their own). A time
-trace of anonymous RSS at scale 1 shows owned − legacy = **+440 KiB at startup,
-then constant (+448 KiB) through 20 s of 60 fps damage**: there is no growth. In
-an otherwise idle process the owned renderer's creation costs 400–412 KiB: solid
-program 72–80, 2D texture program 100–104, external-OES program 104–132, plus the
-vertex array and buffer; fifty further passes add 4 KiB. A per-mapping `smaps`
-diff of two sessions per arm read +0.9–1.2 MiB (heap +640–700, anonymous mmap
-+470–590 KiB); that figure carries the same spread, so take 0.44 MiB as the
-structural cost and treat anything up to 1.2 MiB as the observed range until a
-larger sample says otherwise. Lazy compilation of the external program would save
-about 100 KiB but moves a shader compile into the first frame of a video, so it
-was not done. wlroots' own programs stay resident because screencopy and
-screenshots still use them.
-
-**Gate decision (2026-10-09).** Instructions per frame are flat (0.97–1.01), GPU
-is a tie and memory is a bounded +0.44 MiB, but build-phase CPU is above legacy by
-0.7–4.4 % (1.6–6.5 µs) in the three glass cells, so a literal "at or below
-baseline" is not met. Batching clip rectangles was rejected for now (risk to the
-exactness fixture for about 0.6 % of frame CPU), and the gate was relaxed for this
-stage only. The tolerance is written in [scene-graph.md](scene-graph.md), stage 3:
-output-build CPU and GPU elapsed each within +5 % of legacy in every cell,
-instructions per committed frame within ±3 %, anonymous memory at most +0.5 MiB at
-startup with no growth. Measured against it:
-
-| Criterion | Limit | Measured (worst cell) |
-|---|---:|---:|
-| Output-build CPU | +5 % | +4.4 % (mixed / glass) |
-| GPU elapsed | +5 % | +2.7 % (mixed / glass) |
-| Instructions per frame | ±3 % | 0.973–1.009 |
-| Anonymous memory | +0.5 MiB, no growth | +0.44 MiB, flat for 20 s |
-
-The CPU margin is thin (0.6 points; run-to-run noise on the ratio is about 1.5
-points), so repeat the frame-block A/B whenever the pass or the entry loop changes.
-Later stages are judged against the stage 0 baseline, not this tolerance.
-
-**Repeating the check.** `tests/scene_ab.patch` adds the alternation hook to a
-throwaway copy of the tree (it is a test hook, so it is never applied to the real
-one) and `tests/scene_ab.py` drives it and applies the tolerance:
-
-```sh
-mkdir /tmp/ab && git archive HEAD | tar -x -C /tmp/ab
-(cd /tmp/ab && git apply <repo>/tests/scene_ab.patch && zig build -Doptimize=ReleaseSafe)
-WLR_RENDER_DRM_DEVICE=/dev/dri/renderD128 python3 tests/scene_ab.py --binary /tmp/ab/zig-out/bin/rediwm
-```
-
-The procedure was checked on a fresh export of the committed tree: it builds
-without further setup, the runner refuses an unpatched binary, and a scale 1.5 /
-glass cell read build CPU +3.5 %, GPU +0.3 % (pass), in line with the figures
-above on a machine now in the balanced power profile.
-
-## Remaining stage 3 work
-
-* Cost is settled by the **Gate decision** above. Batching clip rectangles into
- one draw (as wlroots does) remains an option if a later stage needs the
- headroom.
-* Hardware qualification remains: an actual DRM plane and out-timeline release,
- and hotplug on that backend. A nested or headless session cannot show either,
- and the live session holds DRM master, so it has to be run from a spare VT
- (checklist below). NV12 through the external program is covered on this Intel
- node (see Verification); other drivers' YUV conversion and tiled or compressed
- modifiers are not.
-* Per-surface dmabuf feedback tranches are still absent, exactly as in the legacy
- presenter (stage 0 inventory); adding them is a feature, not parity, and waits
- for stage 6.
-* Failures that also occur on HEAD stay out of this stage: the `window_corners`
- focus-border flake, the lock protocol test, the Xwayland titlebar 41 vs 35,
- desktop zoom's client coordinate, the screencast log message, `glass_hold`'s
- drag/reference comparison and the ReleaseSafe D-Bus unit test. Stage 4 rewrites
- the border and footer paths several of them test, so fix them there.
-* Keep the selector until the remaining migration stages have passed. Stage 4
- adds clip groups and primitives; stage 5 moves backdrop blur into this pass.
-
-## Hardware qualification checklist
-
-Not run: it needs DRM master. From a spare VT (Ctrl+Alt+F3), log in as the same
-user and start the compositor with a copy of the config that adds
-`scene_renderer = "owned"` under `[compositor]` (point `REDIWM_CONFIG` at the
-copy). Logs are at debug level, so everything below is in the compositor log.
-
-1. **Starts and draws.** The log says `scene renderer: owned GLES2 output pass`
- and no `scene commit failed`; wallpaper, taskbar, a Files window and glass
- render as on the legacy path.
-2. **Plane scanout.** Run a fullscreen opaque client (a video player or `vkcube`):
- `Direct scan-out enabled` appears, and `disabled` again when a translucent
- window or the cursor-over-UI case breaks the condition. Check the picture does
- not tear or freeze across the switch.
-3. **Out-timeline release.** While scanning out, the client keeps its frame rate
- (it would stall at two buffers if release points were lost); a 60 s run with
- `vkcube` or a video should finish without the client blocking.
-4. **Hotplug.** Plug and unplug an external display, and change its mode and
- scale from Settings: windows move, the other output keeps drawing, and
- neither `scene commit failed` nor a crash appears.
-5. **Lock and suspend.** Lock, suspend and resume once; the lock covers every
- output before anything else is shown.
-6. **Idle.** After a minute untouched, `rediwm-msg perf` shows no commits, as on
- the legacy path.
-
-Record the result here when done. Any failure on the owned path that the legacy
-path does not show blocks making `owned` the default.
-
-**Run 2026-10-11, passed** (the user, from a spare VT, on the stage 4e ReleaseSafe
-build, laptop with Intel iris driving eDP-1 at scale 1.5 and an NVIDIA dGPU): steps
-1, 2, 3, 5 and 6 passed by observation, with no tearing, freeze or crash. Step 4
-(hotplug) was **not run**: no external display was available. Output add, remove
-and scale changes are covered headless by `output_destroy.py`, `output_scale.py`,
-`display_arrangement.py` and `xdg_output.py`, all passing on 4e, but not on a
-real KMS backend; run step 4 when a second display is at hand. The log of the
-last run (`~/rediwm-vt/rediwm.log`) has the owned pass, no `scene commit failed`
-and no compositor errors. It does not show `Direct scan-out enabled`: scanout did
-not engage in that run, plausibly because the fullscreen clients rendered on the
-NVIDIA GPU while the panel scans out from the Intel one. Plane scanout on this
-machine is therefore unconfirmed rather than failed; check it with a client
-forced onto the Intel GPU (`DRI_PRIME=0`, `__GLX_VENDOR_LIBRARY_NAME=mesa`) when
-convenient.
diff --git a/docs/plans/scene-graph-stage4-results.json b/docs/plans/scene-graph-stage4-results.json
deleted file mode 100644
index 1f6a7da..0000000
--- a/docs/plans/scene-graph-stage4-results.json
+++ /dev/null
@@ -1,655 +0,0 @@
-{
- "note": "Stage 4c cost reference, 2026-10-10, i9-12900H, Intel render node, AC, performance profile, ReleaseSafe, headless GLES2 owned presenter.",
- "ab_4b_before_4c": {
- "what": "tests/scene_ab.py on the 4b commit (legacy vs owned presenter, frame blocks); mixed/glass reads 5.1% against the 5% limit, the cell that read 4.4% in stage 3",
- "result": {
- "scale1/clear": {
- "cells": {
- "build_cpu": {
- "n": 3000,
- "legacy": {
- "mean": 209269,
- "median": 205912,
- "p10": 155159,
- "p90": 262000
- },
- "owned": {
- "mean": 206498,
- "median": 204437,
- "p10": 154025,
- "p90": 257986
- }
- },
- "build_wall": {
- "n": 3000,
- "legacy": {
- "mean": 215768,
- "median": 211907,
- "p10": 158021,
- "p90": 270573
- },
- "owned": {
- "mean": 213073,
- "median": 209359,
- "p10": 157370,
- "p90": 266536
- }
- },
- "commit_wall": {
- "n": 3000,
- "legacy": {
- "mean": 227770,
- "median": 224552,
- "p10": 166860,
- "p90": 285451
- },
- "owned": {
- "mean": 224902,
- "median": 221633,
- "p10": 165344,
- "p90": 281540
- }
- },
- "gpu": {
- "n": 3000,
- "legacy": {
- "mean": 261441,
- "median": 264844,
- "p10": 154688,
- "p90": 358958
- },
- "owned": {
- "mean": 254685,
- "median": 258073,
- "p10": 149740,
- "p90": 346875
- }
- }
- },
- "power_before": {
- "ac_online": true,
- "battery": "Charging",
- "platform_profile": "performance",
- "governor": "schedutil",
- "epp": "performance",
- "no_turbo": "0"
- },
- "power_after": {
- "ac_online": true,
- "battery": "Charging",
- "platform_profile": "performance",
- "governor": "schedutil",
- "epp": "performance",
- "no_turbo": "0"
- }
- },
- "scale1/glass": {
- "cells": {
- "build_cpu": {
- "n": 3000,
- "legacy": {
- "mean": 230454,
- "median": 240136,
- "p10": 168624,
- "p90": 276840
- },
- "owned": {
- "mean": 236672,
- "median": 246681,
- "p10": 173355,
- "p90": 284656
- }
- },
- "build_wall": {
- "n": 3000,
- "legacy": {
- "mean": 236394,
- "median": 243204,
- "p10": 170697,
- "p90": 288442
- },
- "owned": {
- "mean": 243022,
- "median": 249857,
- "p10": 175778,
- "p90": 296348
- }
- },
- "commit_wall": {
- "n": 3000,
- "legacy": {
- "mean": 248235,
- "median": 254831,
- "p10": 179186,
- "p90": 302935
- },
- "owned": {
- "mean": 254791,
- "median": 261440,
- "p10": 183976,
- "p90": 310853
- }
- },
- "gpu": {
- "n": 3000,
- "legacy": {
- "mean": 678942,
- "median": 694947,
- "p10": 465834,
- "p90": 854010
- },
- "owned": {
- "mean": 681999,
- "median": 697240,
- "p10": 468281,
- "p90": 852084
- }
- }
- },
- "power_before": {
- "ac_online": true,
- "battery": "Charging",
- "platform_profile": "performance",
- "governor": "schedutil",
- "epp": "performance",
- "no_turbo": "0"
- },
- "power_after": {
- "ac_online": true,
- "battery": "Charging",
- "platform_profile": "performance",
- "governor": "schedutil",
- "epp": "performance",
- "no_turbo": "0"
- }
- },
- "scale1.5/clear": {
- "cells": {
- "build_cpu": {
- "n": 3000,
- "legacy": {
- "mean": 223337,
- "median": 218183,
- "p10": 168229,
- "p90": 272090
- },
- "owned": {
- "mean": 209737,
- "median": 205764,
- "p10": 159362,
- "p90": 258332
- }
- },
- "build_wall": {
- "n": 3000,
- "legacy": {
- "mean": 229792,
- "median": 225240,
- "p10": 171883,
- "p90": 280317
- },
- "owned": {
- "mean": 215783,
- "median": 212877,
- "p10": 162885,
- "p90": 265899
- }
- },
- "commit_wall": {
- "n": 3000,
- "legacy": {
- "mean": 242233,
- "median": 237897,
- "p10": 180610,
- "p90": 295995
- },
- "owned": {
- "mean": 227853,
- "median": 224951,
- "p10": 171214,
- "p90": 280831
- }
- },
- "gpu": {
- "n": 3000,
- "legacy": {
- "mean": 278516,
- "median": 281875,
- "p10": 169531,
- "p90": 366563
- },
- "owned": {
- "mean": 257885,
- "median": 259062,
- "p10": 158489,
- "p90": 344844
- }
- }
- },
- "power_before": {
- "ac_online": true,
- "battery": "Charging",
- "platform_profile": "performance",
- "governor": "schedutil",
- "epp": "performance",
- "no_turbo": "0"
- },
- "power_after": {
- "ac_online": true,
- "battery": "Charging",
- "platform_profile": "performance",
- "governor": "schedutil",
- "epp": "performance",
- "no_turbo": "0"
- }
- },
- "scale1.5/glass": {
- "cells": {
- "build_cpu": {
- "n": 3000,
- "legacy": {
- "mean": 251443,
- "median": 258123,
- "p10": 183023,
- "p90": 298023
- },
- "owned": {
- "mean": 257174,
- "median": 263531,
- "p10": 190779,
- "p90": 304293
- }
- },
- "build_wall": {
- "n": 3000,
- "legacy": {
- "mean": 257999,
- "median": 261822,
- "p10": 185652,
- "p90": 309525
- },
- "owned": {
- "mean": 263686,
- "median": 268048,
- "p10": 196184,
- "p90": 315662
- }
- },
- "commit_wall": {
- "n": 3000,
- "legacy": {
- "mean": 270205,
- "median": 274098,
- "p10": 194814,
- "p90": 323578
- },
- "owned": {
- "mean": 275819,
- "median": 280262,
- "p10": 205394,
- "p90": 329819
- }
- },
- "gpu": {
- "n": 3000,
- "legacy": {
- "mean": 728277,
- "median": 737709,
- "p10": 521875,
- "p90": 887500
- },
- "owned": {
- "mean": 730885,
- "median": 737968,
- "p10": 544114,
- "p90": 886927
- }
- }
- },
- "power_before": {
- "ac_online": true,
- "battery": "Charging",
- "platform_profile": "performance",
- "governor": "schedutil",
- "epp": "performance",
- "no_turbo": "0"
- },
- "power_after": {
- "ac_online": true,
- "battery": "Charging",
- "platform_profile": "performance",
- "governor": "schedutil",
- "epp": "performance",
- "no_turbo": "0"
- }
- },
- "mixed/clear": {
- "cells": {
- "build_cpu": {
- "n": 3000,
- "legacy": {
- "mean": 205123,
- "median": 200058,
- "p10": 153695,
- "p90": 255068
- },
- "owned": {
- "mean": 204523,
- "median": 202528,
- "p10": 154176,
- "p90": 253180
- }
- },
- "build_wall": {
- "n": 3000,
- "legacy": {
- "mean": 210965,
- "median": 204116,
- "p10": 156181,
- "p90": 262051
- },
- "owned": {
- "mean": 210343,
- "median": 206528,
- "p10": 157378,
- "p90": 261705
- }
- },
- "commit_wall": {
- "n": 3000,
- "legacy": {
- "mean": 220876,
- "median": 214265,
- "p10": 163232,
- "p90": 274809
- },
- "owned": {
- "mean": 220098,
- "median": 216515,
- "p10": 164595,
- "p90": 274359
- }
- },
- "gpu": {
- "n": 3000,
- "legacy": {
- "mean": 146915,
- "median": 84427,
- "p10": 10677,
- "p90": 328854
- },
- "owned": {
- "mean": 143605,
- "median": 79844,
- "p10": 10677,
- "p90": 319583
- }
- }
- },
- "power_before": {
- "ac_online": true,
- "battery": "Charging",
- "platform_profile": "performance",
- "governor": "schedutil",
- "epp": "performance",
- "no_turbo": "0"
- },
- "power_after": {
- "ac_online": true,
- "battery": "Charging",
- "platform_profile": "performance",
- "governor": "schedutil",
- "epp": "performance",
- "no_turbo": "0"
- }
- },
- "mixed/glass": {
- "cells": {
- "build_cpu": {
- "n": 3000,
- "legacy": {
- "mean": 163277,
- "median": 161290,
- "p10": 115554,
- "p90": 203699
- },
- "owned": {
- "mean": 171615,
- "median": 165154,
- "p10": 121438,
- "p90": 221156
- }
- },
- "build_wall": {
- "n": 3000,
- "legacy": {
- "mean": 167115,
- "median": 165184,
- "p10": 117212,
- "p90": 208344
- },
- "owned": {
- "mean": 175690,
- "median": 168592,
- "p10": 123640,
- "p90": 227309
- }
- },
- "commit_wall": {
- "n": 3000,
- "legacy": {
- "mean": 173210,
- "median": 169836,
- "p10": 120313,
- "p90": 219092
- },
- "owned": {
- "mean": 182071,
- "median": 175045,
- "p10": 126937,
- "p90": 238248
- }
- },
- "gpu": {
- "n": 3000,
- "legacy": {
- "mean": 435729,
- "median": 351406,
- "p10": 191094,
- "p90": 731979
- },
- "owned": {
- "mean": 448717,
- "median": 358125,
- "p10": 198593,
- "p90": 757396
- }
- }
- },
- "power_before": {
- "ac_online": true,
- "battery": "Charging",
- "platform_profile": "performance",
- "governor": "schedutil",
- "epp": "performance",
- "no_turbo": "0"
- },
- "power_after": {
- "ac_online": true,
- "battery": "Charging",
- "platform_profile": "performance",
- "governor": "schedutil",
- "epp": "performance",
- "no_turbo": "0"
- }
- }
- }
- },
- "analytic_on_vs_off_scale1": {
- "what": "one binary, interleaved on/off/off/on sessions of scene_baseline --modes stats; per-frame microseconds, mean of two sessions each (pair spread 0.1-23%)",
- "frame_work": {
- "scene_commit_cpu": {
- "spinner_clear": {
- "off_us": 215.7,
- "on_us": 225.6
- },
- "spinner_glass": {
- "off_us": 263.6,
- "on_us": 269.6
- },
- "damage_full": {
- "off_us": 284.2,
- "on_us": 325.5
- },
- "drag": {
- "off_us": 416.4,
- "on_us": 469.2
- },
- "resize": {
- "off_us": 412.1,
- "on_us": 414.7
- },
- "zoom_85": {
- "off_us": 245.8,
- "on_us": 272.6
- },
- "zoom_70": {
- "off_us": 268.2,
- "on_us": 275.9
- },
- "zoom_55": {
- "off_us": 250.1,
- "on_us": 267.2
- },
- "zoom_min_hold": {
- "off_us": 241.9,
- "on_us": 269.7
- }
- },
- "gpu_elapsed": {
- "spinner_clear": {
- "off_us": 243.9,
- "on_us": 260.8
- },
- "spinner_glass": {
- "off_us": 703.2,
- "on_us": 706.9
- },
- "damage_full": {
- "off_us": 710.8,
- "on_us": 796.5
- },
- "drag": {
- "off_us": 1053.0,
- "on_us": 1154.4
- },
- "resize": {
- "off_us": 1521.5,
- "on_us": 1502.8
- },
- "zoom_85": {
- "off_us": 672.9,
- "on_us": 713.5
- },
- "zoom_70": {
- "off_us": 711.4,
- "on_us": 723.2
- },
- "zoom_55": {
- "off_us": 684.7,
- "on_us": 698.6
- },
- "zoom_min_hold": {
- "off_us": 246.5,
- "on_us": 281.6
- }
- },
- "cpu_frame": {
- "spinner_clear": {
- "off_us": 537.6,
- "on_us": 555.1
- },
- "spinner_glass": {
- "off_us": 992.1,
- "on_us": 988.9
- },
- "damage_full": {
- "off_us": 940.8,
- "on_us": 1037.6
- },
- "drag": {
- "off_us": 1401.5,
- "on_us": 1537.6
- },
- "resize": {
- "off_us": 2030.7,
- "on_us": 1925.9
- },
- "zoom_85": {
- "off_us": 965.2,
- "on_us": 1021.6
- },
- "zoom_70": {
- "off_us": 1005.9,
- "on_us": 1020.5
- },
- "zoom_55": {
- "off_us": 986.3,
- "on_us": 996.6
- },
- "zoom_min_hold": {
- "off_us": 554.3,
- "on_us": 589.8
- }
- },
- "projection_cpu": {
- "spinner_clear": {
- "off_us": 48.5,
- "on_us": 51.8
- },
- "spinner_glass": {
- "off_us": 52.5,
- "on_us": 53.5
- },
- "damage_full": {
- "off_us": 45.5,
- "on_us": 52.4
- },
- "drag": {
- "off_us": 143.6,
- "on_us": 151.3
- },
- "resize": {
- "off_us": 469.6,
- "on_us": 387.4
- },
- "zoom_85": {
- "off_us": 51.1,
- "on_us": 58.0
- },
- "zoom_70": {
- "off_us": 52.2,
- "on_us": 56.4
- },
- "zoom_55": {
- "off_us": 52.2,
- "on_us": 54.9
- },
- "zoom_min_hold": {
- "off_us": 48.6,
- "on_us": 51.6
- }
- }
- },
- "idle_rss_anon_kb": {
- "off": [
- 46324,
- 45612
- ],
- "on": [
- 45060,
- 46328
- ]
- }
- }
-}
\ No newline at end of file
diff --git a/docs/plans/scene-graph-stage4.md b/docs/plans/scene-graph-stage4.md
deleted file mode 100644
index 472661c..0000000
--- a/docs/plans/scene-graph-stage4.md
+++ /dev/null
@@ -1,581 +0,0 @@
-# Scene graph plan, stage 4: clipping and primitives
-
-Status: **4a to 4e done**, 2026-10-11 (the stage 3 hardware checklist passed before 4e merged). Stage 3 of
-[scene-graph.md](scene-graph.md) (the owned output pass, radius zero) is done
-apart from hardware qualification; this stage is why the plan exists: the user
-requires clipped client corners, and wlroots 0.20 cannot mask a client. The five
-decisions at the end were taken the same day, all as recommended.
-
-## Goal and exit
-
-One rounded-rectangle shape, with a radius per corner, clips a whole window: the
-titlebar chrome, the client surface with its subsurfaces, and whatever sits
-between. It is evaluated in the fragment shader as a signed-distance coverage in
-device pixels, so anti-aliasing is right at any scale and zoom. Borders and
-shadows become shader parameters of the same shape.
-
-Exit, from the master plan's corner requirements:
-
-* Client pixels in a clipped corner are transparent (the backdrop shows) with no
- bright fringe and no seam, at scales 1, 1.25, 1.5 and 2 and at every camera
- zoom step down to `camera_zoom_min`.
-* The same shape clips chrome and client, and hit tests follow it: a click on a
- transparent rounded corner reaches what is below.
-* The skirt, `probeClientEdge`, `side_fills`, the dual border path, the CPU corner
- arcs and `edge_sampling.py` are gone, and the footer is the border width.
-* Cost is at or below the stage 0 baseline and the stage 3 figures; resize and
- move frames are cheaper (no footer raster, no arcs), commits no longer pay the
- edge probe's GL readback and acquire-wait stalls.
-
-## What exists today
-
-Verified in the code on 2026-10-09 (`Toplevel.zig`, `chrome.zig`, `scene_data.zig`).
-
-* **A window is a stack of scene nodes in `frame_tree`:** a shadow tree (four
- corner buffers, four edge buffers and a fallback), the titlebar `ChromeBuffer`,
- the client surface tree, a footer `ChromeBuffer` (the skirt), two `side_fills`
- rects, four `border_rects` and the resize-grab node. Frame size is the client
- geometry plus `2 * frame_border` wide and `titlebarHeight + footerHeight` tall.
-* **The corners are CPU raster.** `ChromeBuffer` draws the rounded frame (the CPU
- twin of the SDF) for each band; both bands are cut from one rounded rectangle.
- The client has square corners, so the frame reserves a footer of
- `max(frame_border, ceil(radius))` below it (10 px at the default
- `border_radius = 10` and density 1) to hold the bottom arcs. `cornerRadius()` is 0 when
- maximized or fullscreen, otherwise `frameRadius() * chromeDensity()`.
-* **The skirt colour is read from the client.** `probeClientEdge` maps the
- surface to its last buffer row, `applyEdgeSample` reads it back with
- `glReadPixels` (after an explicit-sync acquire wait, `edgeAcquireReady`) and
- `chrome.sampleEdge` takes the median, with a format memo, damage
- classification and a retry state machine (`EdgeMapping`, `decideEdgeSample`,
- about 170 lines in `chrome.zig` and about 200 in `Toplevel.zig`).
-* **Borders have two paths:** curved corners inside the `ChromeBuffer`, straight
- edges as four `SceneRect`s inset by `ceil(radius)`, backed by `side_fills`.
- A client-side-decorated window draws a plain four-rect outline outside its
- content instead.
-* **Shadows are CPU patches.** `ShadowBuffer`, `ShadowPatchBuffer` and
- `ShadowPatchSet` (about 440 lines of `chrome.zig`) cache corner and edge
- rasters by state and share them between windows.
-* **Hit testing** is `scene_data.hitTest`: `root.at` on the displayed (projected)
- tree, mapped back with `projection.source`. Chrome buffers carry
- `point_accepts_input` hooks (`chromeAcceptsInput`, `footerAcceptsInput`) that
- evaluate the frame SDF (`insideFrame`). The client surface itself has square
- corners and no shape test, which is correct only because the footer and
- titlebar cover its corners.
-* **`footerHeight` has about 20 compositor-side call sites:** `auto_tiling.zig` (2),
- `Input.zig` (3), `ipc/handlers.zig` (1), `chrome.zig` (the band height) and
- about 14 in `Toplevel.zig` (size clip, layout, snap, maximize and fullscreen
- geometry, input regions, resize edges). Restore and tiling code keep the
- client size and add the chrome back (`saved.height + titlebarHeight +
- footerHeight`), so a footer change moves the frame, not that saved size;
- whether the layout autosave file stores client or frame size is part of the
- 4c audit. (`files/app.zig` has its own, unrelated `footerHeight`.)
-* **Glass is already rounded** (`glass.Effect.configure(effect, cornerRadius, ..)`),
- but its blur is stage 5.
-* **Tests pinned to this design:** `window_corners.py` (283 lines),
- `edge_sampling.py` (229, tests the probe itself), `appearance_chrome.py`,
- `decorations.py`, `kde_decorations.py`, `window_snapping.py` and `xwayland.py`
- (mentions the skirt; also the known 41 vs 35 titlebar assertion).
-
-## Why stage 4 cannot run beside the legacy presenter unchanged
-
-`wlr_scene` draws a client as an unmasked rectangle. As soon as the client extends
-into the corner band, only the owned pass can show it clipped. Deleting the
-footer, skirt and arcs therefore breaks the legacy presenter's corners, and the
-frame height (hence every `footerHeight` consumer) would differ between
-presenters. Two ways to live with that, chosen in D1.
-
-## Design
-
-### Clip shape in the graph
-
-`scene_graph.h` gets a clip: the frame's unrounded layout-space edges, four radii
-(composed scale applied), and a border width. It is a property of a group
-(`Toplevel.frame_tree`), set through a new projection call beside
-`rediwm_projection_set_tree_scale`, and resolve copies it onto every leaf of the
-group, so chrome, client and subsurfaces share one shape. Popups are separate
-trees in the sense that they belong to no window's shape, but the source graph
-makes them children of their parent surface's tree (`Popup.create` uses
-`parent_tree.createSceneXdgSurface`), under `content_tree` and `frame_tree`. A
-tree clip would clip menus and tooltips that hang outside the window, so a popup's
-tree carries a barrier (`rediwm_projection_set_tree_unclipped`, set by
-`Popup.create` in 4c) that ends the inherited clip. Radius 0 means no clip: maximized
-and fullscreen windows, and client-side-decorated windows (decided in stage 0:
-unclipped unless a rule asks). `.shell` windows (Settings) are clipped like
-native ones.
-
-The edges are snapped once, with the same `rediwm_edges_snap` as the pieces, so
-the shape and the quads that tile it agree on pixel columns (the stage 1
-convention: a window is an integer device rectangle). Xwayland needs nothing
-special: the clip lives in layout space, the `1/N` tree scale only changes how
-the texture maps.
-
-### Pass
-
-`scene_pass.c` gains clip variants of its three programs (solid, 2D, external).
-A draw sets the frame rectangle in device pixels, the radii and the border width
-as uniforms; the fragment shader computes `d = sdf(p - frame_centre, size, radii)`
-and multiplies by `coverage(d)`. This is the stage 1 shader
-(`pass_spike.c`: per-corner SDF, `cov`, border ring, `erf` shadow), moved over,
-not rewritten. Rules the spike proved and the production code must keep:
-
-* **The border is part of each piece's fragment,** never a second draw over it
- (`inner = cov(d + b)`, `ring = cov(d) - cov(d + b)`); two partial coverages
- drawn over each other leave a 53-level seam.
-* Premultiplied throughout; the external-OES path equals the 2D path.
-* A shadow is cut out of the window only when the body is translucent.
-
-Culling and damage stay correct by two rules. An item's opaque region becomes its
-rectangle minus the four corner squares (a cross of two rectangles), never the
-full rectangle, or occluded content would be culled through a transparent corner.
-Damage that reaches a clip edge is expanded by one device pixel for anti-aliasing,
-as fractional scale already is. Direct scanout needs radius 0, which fullscreen
-already has.
-
-### Hit tests
-
-The smallest correct change: keep `root.at`, and after it names a window's node,
-test the point against that window's shape; if it falls outside, repeat the pick
-with that window's frame skipped. Chrome's `insideFrame` hooks and the new test
-then share one function. The alternative, a float hit test over the resolved
-items that honours clip and input regions, is the better end state and is what
-stage 6 needs when the view tree goes, but it must reproduce popups, subsurface
-order, input regions and the peek-preview rule in `hitTest`, so it is not first.
-
-### What stays CPU raster
-
-Title text, icons, buttons and the tab strip stay in the titlebar `ChromeBuffer`;
-it loses its corner arcs and its footer twin, so a plain-rectangle titlebar
-re-rasters only on width, title or state changes. Panels, Settings, Files and the
-rest are untouched.
-
-## Sub-stages
-
-Each leaves a working compositor and its own gates.
-
-**Measurement (decided 2026-10-10, after 4c).** The full cost gate runs once, on
-the finished stage after 4e, against the stage 0 baseline and the stage 3 figures
-(see **Cost expectations**). Between sub-stages both presenters are alive and the
-costs 4e removes (footer buffers, plain programs, probe state, shadow patch cache)
-are still paid, so a per-sub-stage A/B records a state about to be deleted, and its
-pair spread (up to 23 %) hides small changes anyway. A sub-stage's own gates are
-correctness ones; cost is at most one on/off pair of `damage_full` as a smoke test
-for gross mistakes (over about 20 %). Each sub-stage is its own commit, so a
-regression the final gate finds is bisected by rerunning the harness on them.
-
-**4a. Clip in the model (no visible change). Done.** `scene_graph.h` has
-`rediwm_clip_spec` (what a tree sets: size, four radii, border, in source units),
-`rediwm_clip` (the same in layout space), `rediwm_clip_resolve`, the per-corner
-signed distance `rediwm_sd_rounded_box` (the stage 1 shader's formula),
-`rediwm_coverage` and `rediwm_clip_opaque`. `projection.c` has two tree addons
-beside zoom and scale: `rediwm_projection_set_tree_clip` (NULL removes it; bad
-sizes, negative or non-finite radii and borders are refused) and
-`rediwm_projection_set_tree_unclipped` (the popup barrier). Resolve evaluates a
-tree's clip after that tree's own zoom and scale, so it follows its window and an
-inner scale never changes it; an inner clipped tree replaces the outer shape for
-its own leaves, and nothing intersects them. Each leaf stores its copy and
-`item.clip` points at it (NULL when unclipped); the glass effect item takes its
-target's clip into storage of its own. No compositor code sets a clip yet.
-
-The opaque cover is the snapped frame minus a square at each corner two pixels
-deeper than the radius (the margin keeps the anti-aliased arc, and the outward
-rounding of a region converted to device pixels at any scale of 1 or more, out of
-the claim). It returns up to three rectangles, or one full-height column when the
-corners leave no room for a middle band: the first version returned nothing for a
-pill-shaped window, which the property test caught. Tests (`test-projection`):
-the geometry above against hand-computed distances including per-corner radii and
-mirroring; a property test over six sizes, seven radius sets and scales 1 to 2
-with fractional origins, asserting every claimed pixel has full coverage under the
-shape, claims never overlap, square corners lose nothing and what is left out is
-bounded; and the projection path (zoom, camera, nested scale, sibling window,
-effect inheritance, replacement, removal, refusal of bad shapes, popup barrier,
-destruction). Zoom, scale, clip and the barrier share one per-tree addon
-(`tree_props`), so resolve does one lookup per tree, where zoom and scale had two.
-
-Gate met. The existing projection tests are unchanged and pass; Debug and
-ReleaseSafe build; `zig build test` passes; and screenshots from both presenters
-at scale 1, 1.5 and mixed are **bit-identical to ones captured before 4a**
-(16 of 16 each, tolerance 0). Cost was measured by timing `resolve()` on a
-30-window scene of 120 trees and 600 leaves, built against the committed
-`projection.c` and against this one, alternating runs: 10.1-10.2 us before and
-10.9 us after, about **+0.7 us per resolve, 1 ns per leaf**. Ablation found where
-it comes from: the unified lookup and the clip math cost nothing measurable; the
-cost is writing the new `item.clip` field on every leaf, and writing only when it
-changes (`else if (item->clip)`) halved it from 1.5 us. A typical scene has a
-fraction of those leaves, so this is far below what any frame-level measure can
-resolve; it is recorded rather than hidden because the gate said no cost change.
-
-**4b. Clip, border and shadow in the pass. Done.** `scene_pass.h` gains
-`rediwm_pass_shape` (a snapped device box, four radii, a border width and colour),
-`rediwm_pass_shadow`, and three calls on a pass from `rediwm_scene_pass_begin`:
-`rediwm_scene_pass_add_rect_shaped`, `_add_texture_shaped` and `_add_shadow`. They
-take the same options as the wlroots calls, plus the shape; `wlr_render_pass` has
-no way to carry one, hence the extension calls. The pass stays free of geometry
-policy: the caller snaps the box (`rediwm_edges_snap`) and scales radii and border,
-and nothing is rounded in the pass. Unclipped draws do not change at all: they keep
-the stage 3 programs, and the shaped ones are separate.
-
-The shader is the spike's, with three changes. The body, the ring and the
-shadow are one fragment program with a `mode` uniform (texture, solid, shadow;
-every fragment of a draw reads the same mode, so the branch costs nothing), built
-twice, for `sampler2D` and for external. The shape's position relative to its
-corner is computed in the vertex stage, so the distance function works on
-window-sized numbers. And a radius is clamped to what fits, so a bad radius never
-produces junk. The backdrop mode of the spike is not ported: glass keeps its own
-blur until the stage that replaces it.
-
-**Memory decided the program count.** Measured as anonymous RSS on the Intel node:
-a GL program costs the driver 130-150 KiB **whatever its size** (the same for a
-one-line solid fill and the full shaped shader). The first version built four
-shaped programs with the renderer and added 600 KiB for nothing, on top of the
-0.44 MiB stage 3 is already carrying. Now there are two, and they are built by
-`rediwm_scene_renderer_enable_shapes` (once, outside a pass; idempotent), which
-costs **about 430 KiB when called and nothing otherwise**. 4c calls it only when
-the owned presenter will draw analytic frames. Until then a shaped draw fails the
-pass at submit (tested), so a missed call cannot draw square corners silently.
-If the build fails, plain drawing is unaffected and the caller learns it from the
-return value.
-
-Gates, all in `test-scene-pass` and run in Debug and ReleaseSafe:
-
-* **Unclipped draws unchanged:** the 128 parity cases against wlroots stay at
- maximum difference **0**, and the same 128 run through the **shaped** programs
- with a shape that covers the whole buffer are also at 0 (so transform, crop,
- filter, alpha, XRGB, damage clip, no-VAO fallback and the external sampler are all
- exact there), plus external-OES shaped equal to wlroots, and a rounded shape on
- external equal to the same shape on the 2D texture.
-* **Clip against an 8x8 supersampled reference** at scales 1, 1.25, 1.5 and 2 and
- zoom 1 to .25, windows built with `rediwm_clip_resolve` and `rediwm_edges_snap`:
- zero fringe, maximum error **18 levels of 208**. The spike's 12 did not include
- scale 1.25; the worst pixel is (2,2) of an 8.75 px radius, where area coverage is
- .33 and the one-pixel distance ramp gives .41. That is the ramp itself, not a
- defect: on a curved 45-degree edge it cannot equal area coverage, and `glass.c`
- already uses it. The bound is 20.
-* **Piece joins:** titlebar, client and footer meet with no seam at every scale
- and zoom, and the snapped pieces tile the shape exactly.
-* **Border and body are one shape:** three pieces with a ring in the body's colour
- equal one plain body (difference 0), and the ring is its own colour on the outer
- row and the left edge.
-* **Premultiplied edges:** half-transparent, XRGB with a junk alpha byte and a
- half-opacity texture, inside and on every edge pixel against area coverage.
-* **The opaque cover of 4a, in real pixels:** drawing `rediwm_clip_opaque`'s
- rectangles with blending off and then the window over them changes nothing, at
- every scale and zoom. This is the claim 4c's blend decisions rest on.
-* **Shadow** against the `erfc` profile (difference 0 levels), monotonic, kept out
- of the window when asked, and showing through when not.
-* **Damage across a clip edge:** a full frame, then a second one painted only
- inside damage that cuts through two corner arcs, the ring and the shadow, equals
- the full repaint exactly (all four channels, 8 scale/zoom cases), with a control
- that the two frames really differ on both sides of the damage edge.
-
-The gates can fail: a coverage ramp offset, a halved ring, a shadow that ignores
-`hide`, a shaped texture that ignores the opaque flag, and a ring colour that is
-dropped each fail a gate when injected into the shader.
-
-Outside the fixture: Debug and ReleaseSafe builds and `zig build test` pass; the
-owned presenter matches the legacy one on all 16 goldens at tolerance 0; and
-`explicit_sync`, `direct_scanout`, `screenshot_regressions`, `appearance_chrome`,
-`output_scale`, `desktop_damage` and `panel_damage` pass on the owned path.
-
-Left for later, from what the numbers allow: the 128-case result means the shaped
-program with no shape is exactly the plain one, so 4e could replace the three
-plain programs by the two shaped ones and give back about 410 KiB, if the cost of
-the solid fill (every rectangle goes through it) is acceptable. It is not done here.
-
-**4c. Analytic frames, owned path only. Done.** When the owned presenter starts
-and `enable_shapes` works, `Server.init` sets `chrome.analytic_frames` (before any
-window exists: every frame height depends on it) and the legacy path is untouched.
-
-What a decorated window is then:
-
-* `Toplevel.applyShape` gives `frame_tree` one clip (frame size, the radius on all
- four corners, `frame_border`, and the ring colour times the window opacity), from
- `syncChrome` and `applyOpacity`. A maximized window has a square one, for its
- border; CSD and fullscreen windows have none and keep the rect outline.
-* The footer is `frame_border`, so the frame is 9 px shorter at the default radius
- and the client reaches the bottom. `chrome.footerHeight` reads the flag, so the
- ~20 call sites followed without edits. Saved layouts store client geometry, so
- they restore at the same client size.
-* Titlebar and footer are plain bands (`ChromeState.radius` 0, no outer
- anti-aliasing: the shader gives them corners and edge); the footer buffer stays as
- a one-row fill and is deleted in 4e. Border rects are off; side fills stay rects.
- No edge probe runs (`applyEdgeSample`), so a commit no longer pays its GL
- readback and acquire wait.
-* `shadow_tree`, a new tree holding only the invisible resize grab, and every xdg
- popup carry `setTreeUnclipped`. Window capture, which draws the client alone in its
- own loop, is handed the frame's shape (`PassShape`) so a captured window keeps
- transparent bottom corners (D3).
-* **Hit tests** needed no post-filter after all: the view's `point_accepts_input`
- (`accepts()` in `projection.c`) evaluates the shape, and `wlr_scene_node_at`
- already goes on to the next node under a point that declines. Pointer constraints,
- tablets and touch share it. A rect cannot decline, but the only rects under a
- shape are the 1 px side fills, which are resize edges anyway.
-* **A changed clip damages its rim** (`damage_clip_change`, new `scene_damage.c`,
- tested without a GPU): the border colour changes on hover with no view moving, so
- nothing else would tell wlroots. The rim is as wide as the largest radius plus the
- border and a margin.
-
-Deviations from the plan, each forced by something found on the way:
-
-* **The ring is composited over the body, not split from it.** The default
- `window_border` is `rgba(1,1,1,0.09)`; the spike's partition (body keeps the inset
- shape, the ring the rest) assumes an opaque ring and would draw a nearly invisible
- one over a transparent window. The shader now computes
- `(body * (1 - ring.a * w) + ring * w) * coverage`, which equals the partition for
- an opaque ring and matches the legacy border rects for a translucent one (gate 3
- has the case). This changed the 4b shader.
-* **The ring is uniform: `max(1, round(border * scale))`.** The legacy straight edge
- is a snapped rect whose width follows the device grid (at 1.25 the right edge is two
- pixels, the left one). The two agree on integer scales; `frame_parity` leaves the
- rightmost column out on fractional scales.
-* **A clipped item is drawn in two parts** (`scene_output.c`): the ring-free interior
- as before, one rectangle deeper than the corner arcs and the ring (a cross of three
- rectangles cost about twelve scissored draws per window), and the rest through the
- shape. Only that interior may block what is below or skip blending; the model's
- cover is used for occlusion, minus a margin for the ring. A window's items share one
- clip, so its cover is built once per run. Scanout refuses a clipped item.
-* Output transforms permute the radii (`device_radii`, derived from the same
- function that places the boxes).
-
-Gates:
-
-* **Screenshots, legacy and owned side by side** (`frame_parity`, at 1, 1.25, 1.5 and
- 2): titlebar band, left and right side columns, the client interior and the shadow
- are **bit-identical** (maximum difference 0); the frame is 9 px shorter and its
- client box equal. The corner arcs differ by at most one level. The goldens cannot
- match whole any more (the bottom band differs, and the shadow moves up with it),
- and a recapture at scale 1 shows the client regions at the same positions.
-* **Corners and clicks** (`window_corners.py`, owned): the client's bottom corner
- pixels are the wallpaper, the interior next to the arc keeps the client colour, a
- hit test at a clipped corner reaches nothing (`none`) while the interior is the
- window's. Unit tests in `projection_test.c`: the same point falls through to a
- window below, and a changed border colour, a new shape and a removed one damage the
- rim and only the rim, nothing for an unchanged one or a hidden window.
-* **Window capture** (`capture.py`, owned, server-decorated fixture): bottom corners
- are transparent (premultiplied black, alpha 0), interior intact.
-* Skirt check of `window_corners.py` made footer-aware; the Xwayland titlebar pin
- (41, stale since the default `chrome_height` became 46; the code gives
- `round(46 * 0.75)` = 35) is corrected and `test_native_scaling_managed_window`
- passes on both presenters.
-* Owned-path runs of `appearance_chrome`, `decorations`, `kde_decorations`,
- `window_snapping`, `window_tabs`, `direct_scanout`, `explicit_sync`,
- `desktop_damage`, `panel_damage`, `capture`, `screenshot_regressions`,
- `output_scale`, `popup_constraint`, `focus_zoom`, `initial_window_state`,
- `workspaces`, `output_destroy`, `pointer_constraints` and `mini_map_windows` pass.
- Failures that also occur identically on legacy (`desktop_canvas`, `desktop_zoom`,
- `mini_map`, `mini_map_canvas`, `files_decoration`, `glass_hold`, `wifi_popup`, and
- `window_titles`, whose client sends an invalid UTF-8 title) are not this stage's.
- `workspace_focus` in `window_corners.py` flaked on both presenters.
-
-Cost, measured on one binary with analytic frames on and off, interleaved on, off,
-off, on at scale 1 (`scene-graph-stage4-results.json`; pair spread 0.1 to 23 %, so
-read only the larger differences): resize is cheaper (`projection_cpu` -17 %,
-`cpu_frame` -5 %). Where a whole window repaints it is dearer: `damage_full` and
-drag read **+10 to +14 % output-build CPU and +10 to +12 % GPU** (about +40 to +90
-us a frame), the lighter scenarios 0 to +7 %. That is a finding against "no rise in
-build CPU or GPU": the shaded rim, program switches between the plain and the shaped
-program, and about five draws per window item instead of one. Memory: nothing from
-the frames themselves, but `enable_shapes` costs **about 1.3 MiB of anonymous
-memory** in the real compositor (the isolated link measured 430 KiB; the driver
-holds more once the programs exist), on top of the 0.44 MiB of stage 3. Both are
-expected to come back in 4e (footer buffers, the plain programs, the probe's state),
-and 4d removes the shadow patch cache if it passes.
-
-Consequence for input: with the client reaching the bottom edge, the resize grab
-inside the frame at the bottom shrinks from the 10 px footer to about 1 px (the 10 px
-reach outside is unchanged), like the left and right edges, and the south corner
-zones shrink with it. Revisit if it is felt.
-
-Leftover: the 4b A/B reference (legacy vs owned, before 4c) reads +5.1 % in
-mixed/glass, 0.1 point over its limit and the same cell that read +4.4 % in stage 3.
-
-**4d. Analytic shadows (owned path).** Replace the CPU patch set with the
-spike's analytic shadow. Gate: side-by-side against the CPU shadow, especially
-corners (the spike compared only straight edges: approximate at corners), within
-an agreed tolerance and no visible change in `appearance_chrome`. If the corners
-do not pass, keep the CPU patches and drop this sub-stage; it is not on the
-critical path.
-
-*Done, gate met.* The shadow is a property of the window's shadow tree
-(`rediwm_projection_set_tree_shadow`, `rediwm_shadow_spec` in `scene_graph.h`),
-resolved like the clip into `item.shadow` on a `REDIWM_ITEM_SHADOW` leaf. The leaf
-is the old fallback node without a buffer: it carries the footprint, the window's
-opacity and input (`chromeAcceptsInput`, as before), never pixels. Because wlroots
-damages nothing for a bufferless view, `present` damages the footprint it last
-drew and the new one when the box, the shadow, the opacity or visibility changes,
-and when the leaf is hidden, unreached or destroyed (`test_shadow_output`).
-`scene_output.c` draws it with `rediwm_scene_pass_add_shadow`, the offset taken to
-device pixels as the difference of two snapped boxes so output transforms turn it.
-
-The look did not come from the spike. The CPU shadow is not a Gaussian: it is full
-strength inside the moved shape and falls off with a smoothstep over
-`shadow_size` (`chrome.shadowCoverage`), so the shaped program's mode 2 now
-evaluates exactly that on the same distance field instead of the spike's erf.
-`rediwm_pass_shadow.sigma` became `softness`. Because both are functions of the
-one distance field, the corners match as well as the edges, which removes the
-plan's worry about the spike's corner approximation. Gates:
-
-* `test-scene-pass`: every pixel of a radius 10, softness 24, offset 8 shadow at
- scales 1 and 1.5 is within **1 level** of the CPU formula, corners included.
-* `window_corners.py` `frame_parity` (owned against legacy, same binary, scales 1,
- 1.25, 1.5, 2): the shadow above, left of and at the top corners of the window,
- and (at integer scales, where the 9 px taller legacy frame lands on whole pixels)
- below it with both bottom corners, is within **0 to 1 level** of the CPU
- patches. The one exception is a legacy defect the comparison found: the 9-slice
- side patches treat the window's edge as straight down to the offset corner
- patch, so a few pixels under each bottom arc showed bare wallpaper where the
- shadow is at full strength (6 pixels at scale 1, 48 at scale 2). The analytic
- shadow fills them; the test allows only those, and only under a bottom arc.
-* `appearance_chrome.py` passes under owned; `window_corners.py` passes apart
- from the `workspace_focus` flake, which fails at the same rate on HEAD (1 of 3
- runs at 1.5 on each).
-
-The CPU patch set is no longer built on the owned path, so its cache costs nothing
-there; its code goes in 4e. Cost was not measured here (see **Measurement**): one
-shaded quad per window replaces eight textured ones, and the collector already
-culls it under the window's opaque client, so it shades only the rim and the
-translucent titlebar.
-
-**4e. Flip and delete.** Make `owned` the default (it requires the stage 3 hardware
-checklist to have passed on a real KMS session), then delete the code only the
-legacy presenter needed: `probeClientEdge` and the edge-sample machinery in
-`Toplevel.zig` and `chrome.zig`, `EdgeMapping`/`decideEdgeSample`/`sampleEdge`,
-`side_fills`, `border_rects` for decorated windows, the footer `ChromeBuffer`,
-`FooterMemo`, the CPU arcs, the shadow patch cache if 4d passed, and
-`edge_sampling.py`. Rewrite the "Borders have two paths" and "Skirt colour" notes
-in `AGENTS.md`. The audit of the ~22 footer sites happens here for the legacy flag
-(D1 decides whether it disappears). The stage's cost gate runs after this, on the
-owned-only compositor (see **Measurement** and **Cost expectations**); it decides
-whether 4c's repaint cost (+10 to +14 % build CPU in `damage_full` and drag) and
-the `enable_shapes` memory came back.
-
-*Done; merged 2026-10-11 after the stage 3 hardware checklist passed.*
-`owned` is the only presenter: `Server.init` refuses a renderer that is not
-GLES2 (llvmpipe through `WLR_RENDERER_ALLOW_SOFTWARE`, per the master plan's
-renderer policy) and the `scene_renderer` key is gone (an old config's key is
-ignored like any unknown one). Deleted: the footer `ChromeBuffer`, `FooterMemo`
-and the `Band` split, the CPU corner arcs and border coverage in
-`ChromeBuffer.rasterize`, all edge sampling (`probeClientEdge`, `EdgeMapping`,
-`decideEdgeSample`, `sampleEdge`, `readFormat`, the acquire wait, the skirt), the
-CPU `ShadowBuffer`, the patch set and its cache, border rects on decorated
-windows, the `sample_edge` argument of `syncChrome`, `footerAcceptsInput`,
-`chrome.footerHeight` (every site now reads `frame_border`), `edge_sampling.py`,
-`scene_ab.py` and its patch, `frame_parity` and `scene_baseline`'s paired mode.
-**One deviation:** `side_fills` were not deleted. The ring is composited over
-whatever body pixel is under it, so the 1 px band beside and below the client
-needs a body; the footer raster becomes a third rect (`frame_fills`, left, right,
-bottom, `fillColor()`), the same colour the analytic footer band had. The IPC
-`skirt_fill`, `edge_sample`, `footer_paints` and `edge_samples_*` fields stay in
-the wire format with constant values. `chrome.shapes` false (the programs did not
-link) now means square windows without ring or shadow, not CPU corners.
-
-Moving the tests off pixman found three GLES2 bugs the pixman default had hidden,
-all present on master too: `SamplePixels` returned ABGR as 0xAARRGGBB (red and
-blue swapped), `DumpBuffer` refused panels presented through their texture, and
-the greeter's Mesa shader cache wrote `~/.cache` under its home (now disabled in
-greeter mode). Tests run on GLES2: `ipc_client.py` defaults
-`WLR_RENDER_DRM_DEVICE` to renderD128, and every hard-coded pixman default became
-gles2.
-
-Gates: Debug and ReleaseSafe build, `zig build test` (785/785; the 16 removed
-tests went with their code), `test-projection`, `test-scene-pass` in both modes.
-A sweep of all 121 runnable suites (helpers, perf scripts and `brave_input`
-excluded): 87 pass; the other 34 fail identically on master run on GLES2 with the
-owned presenter (4d), so none comes from the deletions. They are the known HEAD
-failures (`animations`, `desktop_canvas`, `desktop_zoom`, `desktop_icons` and
-`files_decoration` without `REDIWM_IPC_AUTOMATION`, `glass_hold`, `mini_map*`,
-`screencast`, `window_titles`, `wlr_protocols`, the `workspace_focus` flake,
-stale-envelope `session_restart`) and suites that had only been run on pixman
-(`power_menu`, `power_profiles`, `hardware_keys`, `start_menu`, `switcher*`,
-`taskbar_peek`, `wifi_popup`, `files_*` timeouts, `night_light`, `polkit`,
-`screenshot_tool`, `startup_warmup`, `battery_popup`, `calendar_popup`,
-`client_cursor`, `appearance_wallpaper`). Whether each of those passes on pixman
-was not measured; making them pass on GLES2 is follow-up work, since pixman is no
-longer a renderer the session can use.
-
-**Stage cost gate** (`scene-graph-stage4e-cost.json`): ReleaseSafe stage 0 baseline
-(f6e7b24) against 4e, `scene_baseline.py` clean and stats sessions, interleaved
-stage 0, 4e, 4e, stage 0, AC power, P-cores pinned. In the clean sessions (no
-timers; pair spread 0 to 3 % on all but `fullscreen`):
-
-* **CPU: lower everywhere.** Instructions per second -3 to -36 % in every
- scenario of every configuration (`damage_full` -27 to -36 %, `drag` -26 to
- -31 %, `resize` -32 to -35 %, the zoom steps -4 to -17 %); commit counts match
- within 2 %, so per frame too. Cycles are lower in most cells and within +7 % in
- the rest. 4c's +10 to +14 % repaint finding is gone.
-* **Memory: higher, a finding.** Anonymous RSS is **+1.6 to +2.3 MiB** above stage
- 0 in every cell. The expected savings were small (a footer band is one row per
- window), while the shaped programs (about 1.3 MiB in the compositor), stage 3's
- 0.44 MiB and the plain programs remain. The cheapest recovery is 4b's measured
- option: the shaped programs with no shape equal the plain ones bit for bit, so
- the three plain programs (about 410 KiB) can go if solid fills through the
- shaped program cost nothing measurable.
-* **GPU and frame timers: inconclusive.** The stats sessions read +60 to +90 % at
- scale 1.5 and mixed and -6 to -45 % at scale 1, but two identical 4e sessions
- differ by up to 50 % there, and the timer itself is the owned pass's in one
- binary and wlroots' in the other. Stage 3's in-process A/B (same timer, same
- session) remains the reference for GPU: within +5 % at 1.5.
-
-## Cost expectations
-
-Judged once, after 4e (see **Measurement** under Sub-stages).
-
-| Area | Expectation |
-|---|---|
-| Idle CPU, wakeups | Unchanged; no new timers. |
-| Commit of a client | Lower: no edge probe (GL readback, acquire wait, format memo). |
-| Resize and move frames | Lower: the footer raster and the titlebar arcs go; titlebar re-rasters only on width/title/state. |
-| Output build CPU | Within the stage 3 tolerance of the stage 3 figures. |
-| GPU | A distance-field multiply per fragment of clipped windows only; check `gpu_elapsed`. |
-| RAM | Lower after 4e: footer buffers, and with 4d the shadow patch cache, are freed. 4c adds the shaped programs (about 430 KiB, `enable_shapes`) on the owned path only; judge the net of the two. |
-
-The live legacy/owned A/B (`tests/scene_ab.py`) stops being meaningful once the
-frames differ (4c), so record an owned reference with it, and the `clean` baseline,
-before 4c and judge the stage against those.
-
-## Risks
-
-* **Client geometry changes.** At the default radius a floating window of a given
- client size is 9 logical px shorter, and a tile or other fixed-frame window
- gains 9 px of client height. Snap, resize edges, tabs, Xwayland and the pinned
- tests need the audit above; known assertions (Xwayland 41 vs 35) get rewritten
- with the explicit numbers, not loosened.
-* **Opaque-region culling through corners** (over-culling shows holes) and **damage
- at the clip edge** (stale edge pixels): both have explicit rules and gates.
-* **Hit-test post-filter** must keep pointer constraints, tablets, touch and
- drag-and-drop on one path (they all use `hitTest`).
-* **Consumers that bypass the group** (audited in 4a): the close-animation
- snapshot is a child of `content_tree`, hence inside the clipped tree, and
- inherits the shape. The taskbar peek only changes the real window's opacity.
- The switcher shows a scaled thumbnail of the client buffer on a card and the
- mini-map draws rectangles; neither shows a framed window, so neither changes.
- **Window capture does bypass it:** `WindowCaptureSource` walks the content tree
- with `wlr_scene_node_for_each_buffer` and draws each buffer in its own loop
- (through the selected pass). It captures the client without the chrome, so D3
- reduces to the client's two bottom corners; making them transparent means giving
- that loop the frame's clip and the clip shader (4c), not a graph change.
-* **Fractional zoom and 1/N:** the arc is analytic, but the quad edges still snap;
- gates cover the full grid.
-* **Pre-existing failures** in suites this stage rewrites (`window_corners` flake,
- the Xwayland titlebar assertion) are fixed here rather than carried.
-
-## Decisions (taken 2026-10-09, all as recommended)
-
-* **D1. The legacy presenter goes at 4e.** The `legacy` choice is removed there,
- folding the chrome-related part of stage 6 into this stage, and the footer flag
- disappears with it. It follows the stage 3 hardware checklist and a period of
- use with `owned` as the default; until then 4c keeps the old geometry behind the
- flag. Cost: no fallback if the owned path misbehaves on some GPU, which is why
- the checklist comes first.
-* **D2. Shadows:** try analytic in 4d and keep the CPU patches as the fallback if
- the corners do not pass.
-* **D3. Window capture:** the client's bottom corners are transparent in a
- captured window (see the audit above for how).
-* **D4. CSD windows:** stay unclipped, with the rect outline.
-* **D5. Hit tests:** a shape post-filter on the existing pick now; the graph hit
- test arrives with stage 6.
-
-## Not in this stage
-
-Backdrop blur in the pass (stage 5), deleting `wlr_scene` output rendering and the
-projection view tree (stage 6), per-surface dmabuf feedback, and any change to
-text, icons or the Cairo-drawn clients.
diff --git a/docs/plans/scene-graph-stage4e-cost.json b/docs/plans/scene-graph-stage4e-cost.json
deleted file mode 100644
index cca970f..0000000
--- a/docs/plans/scene-graph-stage4e-cost.json
+++ /dev/null
@@ -1,2837 +0,0 @@
-{
- "what": "stage 4e cost gate: stage 0 baseline (f6e7b24) vs 4e (a35f78b), ReleaseSafe, scene_baseline clean and stats sessions, interleaved stage0, 4e, 4e, stage0",
- "runs": {
- "stage0-a": {
- "meta": {
- "binary_bytes": 26769600,
- "kernel": "7.2.9-zen1-1-zen",
- "cpu": "12th Gen Intel(R) Core(TM) i9-12900H",
- "pinned_cpus": [
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9
- ],
- "render_device": "/dev/dri/renderD128",
- "seconds": 4.0,
- "power": {
- "ac_online": true,
- "battery": "Not charging",
- "platform_profile": "performance",
- "governor": "schedutil",
- "epp": "performance",
- "no_turbo": "0"
- },
- "date": "2026-10-10 15:50:13"
- },
- "clean": {
- "scale1": {
- "idle": {
- "cpu_percent": 0.007,
- "instructions_per_s": 2148,
- "cycles_per_s": 7009,
- "ghz_user": 0.1,
- "rss_anon_kb": 43320,
- "voluntary_switches_per_s": 0.4
- },
- "spinner_clear": {
- "cpu_percent": 8.561,
- "instructions_per_s": 37261806,
- "cycles_per_s": 45940141,
- "ghz_user": 0.537,
- "rss_anon_kb": 43964,
- "voluntary_switches_per_s": 189.0
- },
- "spinner_glass": {
- "cpu_percent": 11.272,
- "instructions_per_s": 66549324,
- "cycles_per_s": 63137710,
- "ghz_user": 0.56,
- "rss_anon_kb": 44076,
- "voluntary_switches_per_s": 184.2
- },
- "damage_full": {
- "cpu_percent": 20.96,
- "instructions_per_s": 86130727,
- "cycles_per_s": 121318553,
- "ghz_user": 0.579,
- "rss_anon_kb": 44076,
- "voluntary_switches_per_s": 671.2
- },
- "drag": {
- "cpu_percent": 8.221,
- "instructions_per_s": 71941251,
- "cycles_per_s": 56295526,
- "ghz_user": 0.685,
- "rss_anon_kb": 44080,
- "voluntary_switches_per_s": 161.5
- },
- "resize": {
- "cpu_percent": 22.294,
- "instructions_per_s": 306403872,
- "cycles_per_s": 194516234,
- "ghz_user": 0.873,
- "rss_anon_kb": 44240,
- "voluntary_switches_per_s": 336.5
- },
- "fullscreen": {
- "cpu_percent": 42.109,
- "instructions_per_s": 58916670,
- "cycles_per_s": 296522031,
- "ghz_user": 0.704,
- "rss_anon_kb": 47984,
- "voluntary_switches_per_s": 97.7
- },
- "zoom_85": {
- "cpu_percent": 10.48,
- "instructions_per_s": 64087560,
- "cycles_per_s": 61356128,
- "ghz_user": 0.585,
- "rss_anon_kb": 47984,
- "voluntary_switches_per_s": 184.5
- },
- "zoom_70": {
- "cpu_percent": 8.629,
- "instructions_per_s": 67385670,
- "cycles_per_s": 65201832,
- "ghz_user": 0.756,
- "rss_anon_kb": 48028,
- "voluntary_switches_per_s": 187.5
- },
- "zoom_55": {
- "cpu_percent": 8.831,
- "instructions_per_s": 64805020,
- "cycles_per_s": 66046897,
- "ghz_user": 0.748,
- "rss_anon_kb": 48028,
- "voluntary_switches_per_s": 187.2
- },
- "zoom_min_hold": {
- "cpu_percent": 8.452,
- "instructions_per_s": 38225267,
- "cycles_per_s": 45261748,
- "ghz_user": 0.536,
- "rss_anon_kb": 48352,
- "voluntary_switches_per_s": 188.2
- }
- },
- "scale1.5": {
- "idle": {
- "cpu_percent": 0.009,
- "instructions_per_s": 4715,
- "cycles_per_s": 10064,
- "ghz_user": 0.118,
- "rss_anon_kb": 46924,
- "voluntary_switches_per_s": 0.6
- },
- "spinner_clear": {
- "cpu_percent": 8.329,
- "instructions_per_s": 39301463,
- "cycles_per_s": 44327664,
- "ghz_user": 0.532,
- "rss_anon_kb": 47532,
- "voluntary_switches_per_s": 189.0
- },
- "spinner_glass": {
- "cpu_percent": 11.224,
- "instructions_per_s": 69481427,
- "cycles_per_s": 63336825,
- "ghz_user": 0.564,
- "rss_anon_kb": 47532,
- "voluntary_switches_per_s": 184.2
- },
- "damage_full": {
- "cpu_percent": 20.422,
- "instructions_per_s": 92265211,
- "cycles_per_s": 124894969,
- "ghz_user": 0.612,
- "rss_anon_kb": 47616,
- "voluntary_switches_per_s": 667.7
- },
- "drag": {
- "cpu_percent": 9.046,
- "instructions_per_s": 74760289,
- "cycles_per_s": 57853461,
- "ghz_user": 0.64,
- "rss_anon_kb": 47740,
- "voluntary_switches_per_s": 159.4
- },
- "resize": {
- "cpu_percent": 28.391,
- "instructions_per_s": 481284302,
- "cycles_per_s": 254467079,
- "ghz_user": 0.896,
- "rss_anon_kb": 47776,
- "voluntary_switches_per_s": 330.7
- },
- "fullscreen": {
- "cpu_percent": 34.89,
- "instructions_per_s": 65074304,
- "cycles_per_s": 383433783,
- "ghz_user": 1.099,
- "rss_anon_kb": 55652,
- "voluntary_switches_per_s": 159.2
- },
- "zoom_85": {
- "cpu_percent": 9.602,
- "instructions_per_s": 68325817,
- "cycles_per_s": 64487132,
- "ghz_user": 0.672,
- "rss_anon_kb": 55652,
- "voluntary_switches_per_s": 186.5
- },
- "zoom_70": {
- "cpu_percent": 11.714,
- "instructions_per_s": 69120620,
- "cycles_per_s": 60680918,
- "ghz_user": 0.518,
- "rss_anon_kb": 56376,
- "voluntary_switches_per_s": 183.5
- },
- "zoom_55": {
- "cpu_percent": 11.454,
- "instructions_per_s": 67753095,
- "cycles_per_s": 61215246,
- "ghz_user": 0.534,
- "rss_anon_kb": 56376,
- "voluntary_switches_per_s": 184.2
- },
- "zoom_min_hold": {
- "cpu_percent": 8.764,
- "instructions_per_s": 40218154,
- "cycles_per_s": 45871669,
- "ghz_user": 0.523,
- "rss_anon_kb": 56544,
- "voluntary_switches_per_s": 188.0
- }
- },
- "mixed": {
- "idle": {
- "cpu_percent": 0.006,
- "instructions_per_s": 2153,
- "cycles_per_s": 8170,
- "ghz_user": 0.145,
- "rss_anon_kb": 47288,
- "voluntary_switches_per_s": 0.6
- },
- "spinner_clear": {
- "cpu_percent": 7.917,
- "instructions_per_s": 47992588,
- "cycles_per_s": 82550805,
- "ghz_user": 1.043,
- "rss_anon_kb": 51880,
- "voluntary_switches_per_s": 242.0
- },
- "spinner_glass": {
- "cpu_percent": 10.036,
- "instructions_per_s": 87188569,
- "cycles_per_s": 120135872,
- "ghz_user": 1.197,
- "rss_anon_kb": 51880,
- "voluntary_switches_per_s": 185.2
- },
- "damage_full": {
- "cpu_percent": 15.767,
- "instructions_per_s": 107738693,
- "cycles_per_s": 182660525,
- "ghz_user": 1.158,
- "rss_anon_kb": 51880,
- "voluntary_switches_per_s": 682.0
- },
- "drag": {
- "cpu_percent": 9.071,
- "instructions_per_s": 78526549,
- "cycles_per_s": 64476552,
- "ghz_user": 0.711,
- "rss_anon_kb": 51884,
- "voluntary_switches_per_s": 171.8
- },
- "resize": {
- "cpu_percent": 32.985,
- "instructions_per_s": 536107697,
- "cycles_per_s": 286919249,
- "ghz_user": 0.87,
- "rss_anon_kb": 51884,
- "voluntary_switches_per_s": 329.2
- },
- "fullscreen": {
- "cpu_percent": 42.009,
- "instructions_per_s": 84968148,
- "cycles_per_s": 326907258,
- "ghz_user": 0.778,
- "rss_anon_kb": 56324,
- "voluntary_switches_per_s": 105.2
- },
- "zoom_85": {
- "cpu_percent": 12.8,
- "instructions_per_s": 86292049,
- "cycles_per_s": 74548346,
- "ghz_user": 0.582,
- "rss_anon_kb": 56324,
- "voluntary_switches_per_s": 185.2
- },
- "zoom_70": {
- "cpu_percent": 12.405,
- "instructions_per_s": 76488490,
- "cycles_per_s": 75683930,
- "ghz_user": 0.61,
- "rss_anon_kb": 56904,
- "voluntary_switches_per_s": 240.0
- },
- "zoom_55": {
- "cpu_percent": 11.846,
- "instructions_per_s": 76820779,
- "cycles_per_s": 78728685,
- "ghz_user": 0.665,
- "rss_anon_kb": 56904,
- "voluntary_switches_per_s": 240.2
- },
- "zoom_min_hold": {
- "cpu_percent": 7.551,
- "instructions_per_s": 44598964,
- "cycles_per_s": 61412223,
- "ghz_user": 0.813,
- "rss_anon_kb": 56904,
- "voluntary_switches_per_s": 241.7
- }
- },
- "mixed_noglass": {
- "idle": {
- "cpu_percent": 0.004,
- "instructions_per_s": 2153,
- "cycles_per_s": 9901,
- "ghz_user": 0.282,
- "rss_anon_kb": 45492,
- "voluntary_switches_per_s": 0.8
- },
- "spinner_clear": {
- "cpu_percent": 6.676,
- "instructions_per_s": 36828211,
- "cycles_per_s": 57042863,
- "ghz_user": 0.854,
- "rss_anon_kb": 50096,
- "voluntary_switches_per_s": 245.0
- },
- "spinner_glass": {
- "cpu_percent": 8.054,
- "instructions_per_s": 38496097,
- "cycles_per_s": 53563329,
- "ghz_user": 0.665,
- "rss_anon_kb": 50096,
- "voluntary_switches_per_s": 243.0
- },
- "damage_full": {
- "cpu_percent": 16.016,
- "instructions_per_s": 62708767,
- "cycles_per_s": 119581567,
- "ghz_user": 0.747,
- "rss_anon_kb": 50096,
- "voluntary_switches_per_s": 738.2
- },
- "drag": {
- "cpu_percent": 7.43,
- "instructions_per_s": 57444480,
- "cycles_per_s": 48431570,
- "ghz_user": 0.652,
- "rss_anon_kb": 50100,
- "voluntary_switches_per_s": 185.9
- },
- "resize": {
- "cpu_percent": 26.63,
- "instructions_per_s": 456199374,
- "cycles_per_s": 233276774,
- "ghz_user": 0.876,
- "rss_anon_kb": 50100,
- "voluntary_switches_per_s": 341.2
- },
- "fullscreen": {
- "cpu_percent": 41.434,
- "instructions_per_s": 58924474,
- "cycles_per_s": 308936920,
- "ghz_user": 0.746,
- "rss_anon_kb": 54988,
- "voluntary_switches_per_s": 112.2
- },
- "zoom_85": {
- "cpu_percent": 9.96,
- "instructions_per_s": 39468456,
- "cycles_per_s": 52312942,
- "ghz_user": 0.525,
- "rss_anon_kb": 54988,
- "voluntary_switches_per_s": 242.5
- },
- "zoom_70": {
- "cpu_percent": 9.866,
- "instructions_per_s": 41046045,
- "cycles_per_s": 52899088,
- "ghz_user": 0.536,
- "rss_anon_kb": 55204,
- "voluntary_switches_per_s": 242.2
- },
- "zoom_55": {
- "cpu_percent": 7.92,
- "instructions_per_s": 41720983,
- "cycles_per_s": 57083009,
- "ghz_user": 0.721,
- "rss_anon_kb": 55204,
- "voluntary_switches_per_s": 246.5
- },
- "zoom_min_hold": {
- "cpu_percent": 9.613,
- "instructions_per_s": 39541621,
- "cycles_per_s": 52910659,
- "ghz_user": 0.55,
- "rss_anon_kb": 55204,
- "voluntary_switches_per_s": 246.5
- }
- }
- },
- "stats": {
- "scale1": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "projection_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.4591575743801653,
- "projection_cpu_avg_ms": 0.03438004958677686,
- "scene_commit_cpu_avg_ms": 0.19229907024793388,
- "gpu_elapsed_avg_ms": 0.2073428429752066
- },
- "spinner_glass": {
- "output_commits": 236,
- "cpu_frame_avg_ms": 0.9009571101694915,
- "projection_cpu_avg_ms": 0.039058720338983055,
- "scene_commit_cpu_avg_ms": 0.23926212288135593,
- "gpu_elapsed_avg_ms": 0.6618319576271187
- },
- "damage_full": {
- "output_commits": 235,
- "cpu_frame_avg_ms": 0.984612085106383,
- "projection_cpu_avg_ms": 0.03934975319148936,
- "scene_commit_cpu_avg_ms": 0.29083127659574465,
- "gpu_elapsed_avg_ms": 0.753755574468085
- },
- "drag": {
- "output_commits": 233,
- "cpu_frame_avg_ms": 1.2341325213675212,
- "projection_cpu_avg_ms": 0.1208670641025641,
- "scene_commit_cpu_avg_ms": 0.37906266666666666,
- "gpu_elapsed_avg_ms": 0.951412735042735
- },
- "resize": {
- "output_commits": 221,
- "cpu_frame_avg_ms": 1.978940117647059,
- "projection_cpu_avg_ms": 0.4363554660633484,
- "scene_commit_cpu_avg_ms": 0.3966748823529412,
- "gpu_elapsed_avg_ms": 1.504058923076923
- },
- "fullscreen": {
- "output_commits": 232,
- "cpu_frame_avg_ms": 0.4688855732758621,
- "projection_cpu_avg_ms": 0.02890696551724138,
- "scene_commit_cpu_avg_ms": 0.3068076982758621,
- "gpu_elapsed_avg_ms": 0.6542663663793103
- },
- "zoom_85": {
- "output_commits": 235,
- "cpu_frame_avg_ms": 0.9779377531914893,
- "projection_cpu_avg_ms": 0.04332132340425532,
- "scene_commit_cpu_avg_ms": 0.24300884680851062,
- "gpu_elapsed_avg_ms": 0.6923295829787235
- },
- "zoom_70": {
- "output_commits": 237,
- "cpu_frame_avg_ms": 0.8308669915611814,
- "projection_cpu_avg_ms": 0.036448755274261606,
- "scene_commit_cpu_avg_ms": 0.215647194092827,
- "gpu_elapsed_avg_ms": 0.6046981983122363
- },
- "zoom_55": {
- "output_commits": 237,
- "cpu_frame_avg_ms": 0.8548118902953586,
- "projection_cpu_avg_ms": 0.03720393670886076,
- "scene_commit_cpu_avg_ms": 0.2141233628691983,
- "gpu_elapsed_avg_ms": 0.5981579662447257
- },
- "zoom_min_hold": {
- "output_commits": 240,
- "cpu_frame_avg_ms": 0.6030722583333333,
- "projection_cpu_avg_ms": 0.042376854166666665,
- "scene_commit_cpu_avg_ms": 0.2667810916666667,
- "gpu_elapsed_avg_ms": 0.28046944166666665
- }
- },
- "scale1.5": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "projection_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 243,
- "cpu_frame_avg_ms": 0.40954007818930044,
- "projection_cpu_avg_ms": 0.031484913580246916,
- "scene_commit_cpu_avg_ms": 0.17882212757201646,
- "gpu_elapsed_avg_ms": 0.1798744320987654
- },
- "spinner_glass": {
- "output_commits": 240,
- "cpu_frame_avg_ms": 0.5641712833333333,
- "projection_cpu_avg_ms": 0.025600266666666666,
- "scene_commit_cpu_avg_ms": 0.1522516875,
- "gpu_elapsed_avg_ms": 0.4028302791666667
- },
- "damage_full": {
- "output_commits": 240,
- "cpu_frame_avg_ms": 0.6050955250000001,
- "projection_cpu_avg_ms": 0.026429512500000002,
- "scene_commit_cpu_avg_ms": 0.17305964166666665,
- "gpu_elapsed_avg_ms": 0.5127037740585775
- },
- "drag": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.673444673553719,
- "projection_cpu_avg_ms": 0.0593135826446281,
- "scene_commit_cpu_avg_ms": 0.1989499090909091,
- "gpu_elapsed_avg_ms": 0.6493061074380165
- },
- "resize": {
- "output_commits": 226,
- "cpu_frame_avg_ms": 1.520564115044248,
- "projection_cpu_avg_ms": 0.2708122300884956,
- "scene_commit_cpu_avg_ms": 0.33034799115044244,
- "gpu_elapsed_avg_ms": 1.3481024203539824
- },
- "fullscreen": {
- "output_commits": 147,
- "cpu_frame_avg_ms": 0.3277939094827586,
- "projection_cpu_avg_ms": 0.023594456896551725,
- "scene_commit_cpu_avg_ms": 0.1651398620689655,
- "gpu_elapsed_avg_ms": 0.575213051724138
- },
- "zoom_85": {
- "output_commits": 240,
- "cpu_frame_avg_ms": 0.5581668791666666,
- "projection_cpu_avg_ms": 0.026036670833333334,
- "scene_commit_cpu_avg_ms": 0.1385925625,
- "gpu_elapsed_avg_ms": 0.3789577041666667
- },
- "zoom_70": {
- "output_commits": 240,
- "cpu_frame_avg_ms": 0.6253770958333333,
- "projection_cpu_avg_ms": 0.027517958333333332,
- "scene_commit_cpu_avg_ms": 0.16322040416666667,
- "gpu_elapsed_avg_ms": 0.45915669583333335
- },
- "zoom_55": {
- "output_commits": 239,
- "cpu_frame_avg_ms": 0.6612444937238494,
- "projection_cpu_avg_ms": 0.027054276150627613,
- "scene_commit_cpu_avg_ms": 0.18094078242677825,
- "gpu_elapsed_avg_ms": 0.47095624267782427
- },
- "zoom_min_hold": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.477353652892562,
- "projection_cpu_avg_ms": 0.035840599173553714,
- "scene_commit_cpu_avg_ms": 0.23334519008264465,
- "gpu_elapsed_avg_ms": 0.2334723429752066
- }
- },
- "mixed": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "projection_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 244,
- "cpu_frame_avg_ms": 0.22366032438016528,
- "projection_cpu_avg_ms": 0.019417828512396693,
- "scene_commit_cpu_avg_ms": 0.0711423285123967,
- "gpu_elapsed_avg_ms": 0.06968824173553718
- },
- "spinner_glass": {
- "output_commits": 481,
- "cpu_frame_avg_ms": 0.3603201704781705,
- "projection_cpu_avg_ms": 0.019716914760914764,
- "scene_commit_cpu_avg_ms": 0.09807145322245321,
- "gpu_elapsed_avg_ms": 0.25032259875259877
- },
- "damage_full": {
- "output_commits": 476,
- "cpu_frame_avg_ms": 0.5234386680672268,
- "projection_cpu_avg_ms": 0.0253212268907563,
- "scene_commit_cpu_avg_ms": 0.16186536344537814,
- "gpu_elapsed_avg_ms": 0.41442128842105264
- },
- "drag": {
- "output_commits": 480,
- "cpu_frame_avg_ms": 0.538180817427386,
- "projection_cpu_avg_ms": 0.062489748962655606,
- "scene_commit_cpu_avg_ms": 0.15189451452282157,
- "gpu_elapsed_avg_ms": 0.394198020746888
- },
- "resize": {
- "output_commits": 428,
- "cpu_frame_avg_ms": 1.7977692733644859,
- "projection_cpu_avg_ms": 0.2774745887850467,
- "scene_commit_cpu_avg_ms": 0.3502555093457944,
- "gpu_elapsed_avg_ms": 1.4790129859813084
- },
- "fullscreen": {
- "output_commits": 204,
- "cpu_frame_avg_ms": 0.3605309688888889,
- "projection_cpu_avg_ms": 0.025992651111111112,
- "scene_commit_cpu_avg_ms": 0.09964278,
- "gpu_elapsed_avg_ms": 0.27234848
- },
- "zoom_85": {
- "output_commits": 474,
- "cpu_frame_avg_ms": 0.5235152088607595,
- "projection_cpu_avg_ms": 0.025964350210970464,
- "scene_commit_cpu_avg_ms": 0.15320386497890295,
- "gpu_elapsed_avg_ms": 0.3899301097046413
- },
- "zoom_70": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.432275744813278,
- "projection_cpu_avg_ms": 0.022337881742738586,
- "scene_commit_cpu_avg_ms": 0.11403367842323651,
- "gpu_elapsed_avg_ms": 0.30003154677754673
- },
- "zoom_55": {
- "output_commits": 240,
- "cpu_frame_avg_ms": 0.43181704375,
- "projection_cpu_avg_ms": 0.0235404375,
- "scene_commit_cpu_avg_ms": 0.10152722916666668,
- "gpu_elapsed_avg_ms": 0.30100128125
- },
- "zoom_min_hold": {
- "output_commits": 244,
- "cpu_frame_avg_ms": 0.2882342505175984,
- "projection_cpu_avg_ms": 0.025348476190476192,
- "scene_commit_cpu_avg_ms": 0.10590452795031055,
- "gpu_elapsed_avg_ms": 0.11196914492753622
- }
- },
- "mixed_noglass": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "projection_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 244,
- "cpu_frame_avg_ms": 0.2668644639175258,
- "projection_cpu_avg_ms": 0.02393758762886598,
- "scene_commit_cpu_avg_ms": 0.08915172371134021,
- "gpu_elapsed_avg_ms": 0.09596945360824742
- },
- "spinner_glass": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.3326560186721992,
- "projection_cpu_avg_ms": 0.029384029045643155,
- "scene_commit_cpu_avg_ms": 0.12117700622406638,
- "gpu_elapsed_avg_ms": 0.1318942053941909
- },
- "damage_full": {
- "output_commits": 243,
- "cpu_frame_avg_ms": 0.2877271055900621,
- "projection_cpu_avg_ms": 0.023269548654244306,
- "scene_commit_cpu_avg_ms": 0.1221058447204969,
- "gpu_elapsed_avg_ms": 0.14129957556935818
- },
- "drag": {
- "output_commits": 482,
- "cpu_frame_avg_ms": 0.5083982685950413,
- "projection_cpu_avg_ms": 0.0805863347107438,
- "scene_commit_cpu_avg_ms": 0.23547126652892564,
- "gpu_elapsed_avg_ms": 0.30584741735537185
- },
- "resize": {
- "output_commits": 466,
- "cpu_frame_avg_ms": 0.6754855579399142,
- "projection_cpu_avg_ms": 0.22979009227467811,
- "scene_commit_cpu_avg_ms": 0.30533547854077253,
- "gpu_elapsed_avg_ms": 0.3669263175965665
- },
- "fullscreen": {
- "output_commits": 475,
- "cpu_frame_avg_ms": 0.25020787789473686,
- "projection_cpu_avg_ms": 0.018237595789473687,
- "scene_commit_cpu_avg_ms": 0.1473788863157895,
- "gpu_elapsed_avg_ms": 0.23587149052631579
- },
- "zoom_85": {
- "output_commits": 257,
- "cpu_frame_avg_ms": 0.28875365082644633,
- "projection_cpu_avg_ms": 0.02437617561983471,
- "scene_commit_cpu_avg_ms": 0.10528844214876032,
- "gpu_elapsed_avg_ms": 0.10618425413223141
- },
- "zoom_70": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.3679750997920998,
- "projection_cpu_avg_ms": 0.03170929313929314,
- "scene_commit_cpu_avg_ms": 0.1419679708939709,
- "gpu_elapsed_avg_ms": 0.14726502702702704
- },
- "zoom_55": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.3191905394190871,
- "projection_cpu_avg_ms": 0.02573419294605809,
- "scene_commit_cpu_avg_ms": 0.1207243817427386,
- "gpu_elapsed_avg_ms": 0.12604154771784232
- },
- "zoom_min_hold": {
- "output_commits": 252,
- "cpu_frame_avg_ms": 0.30858861363636364,
- "projection_cpu_avg_ms": 0.024784047520661157,
- "scene_commit_cpu_avg_ms": 0.11151048140495867,
- "gpu_elapsed_avg_ms": 0.11451770661157025
- }
- }
- }
- },
- "4e-a": {
- "meta": {
- "binary_bytes": 26905016,
- "kernel": "7.2.9-zen1-1-zen",
- "cpu": "12th Gen Intel(R) Core(TM) i9-12900H",
- "pinned_cpus": [
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9
- ],
- "render_device": "/dev/dri/renderD128",
- "seconds": 4.0,
- "power": {
- "ac_online": true,
- "battery": "Not charging",
- "platform_profile": "performance",
- "governor": "schedutil",
- "epp": "performance",
- "no_turbo": "0"
- },
- "date": "2026-10-10 15:57:53"
- },
- "clean": {
- "scale1": {
- "idle": {
- "cpu_percent": 0.002,
- "instructions_per_s": 143,
- "cycles_per_s": 2125,
- "ghz_user": 0.094,
- "rss_anon_kb": 45856,
- "voluntary_switches_per_s": 0.4
- },
- "spinner_clear": {
- "cpu_percent": 8.097,
- "instructions_per_s": 35532330,
- "cycles_per_s": 45362343,
- "ghz_user": 0.56,
- "rss_anon_kb": 46444,
- "voluntary_switches_per_s": 189.0
- },
- "spinner_glass": {
- "cpu_percent": 10.864,
- "instructions_per_s": 55434152,
- "cycles_per_s": 59440864,
- "ghz_user": 0.547,
- "rss_anon_kb": 46476,
- "voluntary_switches_per_s": 184.2
- },
- "damage_full": {
- "cpu_percent": 14.127,
- "instructions_per_s": 59091379,
- "cycles_per_s": 83731051,
- "ghz_user": 0.593,
- "rss_anon_kb": 46476,
- "voluntary_switches_per_s": 184.5
- },
- "drag": {
- "cpu_percent": 7.019,
- "instructions_per_s": 50422618,
- "cycles_per_s": 53798894,
- "ghz_user": 0.766,
- "rss_anon_kb": 46476,
- "voluntary_switches_per_s": 161.2
- },
- "resize": {
- "cpu_percent": 25.475,
- "instructions_per_s": 195331388,
- "cycles_per_s": 145529372,
- "ghz_user": 0.571,
- "rss_anon_kb": 46584,
- "voluntary_switches_per_s": 212.7
- },
- "fullscreen": {
- "cpu_percent": 48.143,
- "instructions_per_s": 39770879,
- "cycles_per_s": 302785486,
- "ghz_user": 0.629,
- "rss_anon_kb": 50468,
- "voluntary_switches_per_s": 93.7
- },
- "zoom_85": {
- "cpu_percent": 12.796,
- "instructions_per_s": 54590201,
- "cycles_per_s": 58481027,
- "ghz_user": 0.457,
- "rss_anon_kb": 50468,
- "voluntary_switches_per_s": 183.5
- },
- "zoom_70": {
- "cpu_percent": 11.88,
- "instructions_per_s": 55552863,
- "cycles_per_s": 61481883,
- "ghz_user": 0.518,
- "rss_anon_kb": 50708,
- "voluntary_switches_per_s": 188.2
- },
- "zoom_55": {
- "cpu_percent": 11.175,
- "instructions_per_s": 54814035,
- "cycles_per_s": 61219854,
- "ghz_user": 0.548,
- "rss_anon_kb": 50708,
- "voluntary_switches_per_s": 184.2
- },
- "zoom_min_hold": {
- "cpu_percent": 9.207,
- "instructions_per_s": 36979791,
- "cycles_per_s": 46866099,
- "ghz_user": 0.509,
- "rss_anon_kb": 50920,
- "voluntary_switches_per_s": 187.5
- }
- },
- "scale1.5": {
- "idle": {
- "cpu_percent": 0.001,
- "instructions_per_s": 146,
- "cycles_per_s": 2625,
- "ghz_user": 0.267,
- "rss_anon_kb": 48460,
- "voluntary_switches_per_s": 0.4
- },
- "spinner_clear": {
- "cpu_percent": 8.923,
- "instructions_per_s": 35328119,
- "cycles_per_s": 45453507,
- "ghz_user": 0.509,
- "rss_anon_kb": 49008,
- "voluntary_switches_per_s": 187.7
- },
- "spinner_glass": {
- "cpu_percent": 11.521,
- "instructions_per_s": 57647989,
- "cycles_per_s": 63688367,
- "ghz_user": 0.553,
- "rss_anon_kb": 49008,
- "voluntary_switches_per_s": 183.5
- },
- "damage_full": {
- "cpu_percent": 14.477,
- "instructions_per_s": 64341535,
- "cycles_per_s": 84415504,
- "ghz_user": 0.583,
- "rss_anon_kb": 49220,
- "voluntary_switches_per_s": 183.0
- },
- "drag": {
- "cpu_percent": 7.757,
- "instructions_per_s": 51872182,
- "cycles_per_s": 53782502,
- "ghz_user": 0.693,
- "rss_anon_kb": 49384,
- "voluntary_switches_per_s": 161.2
- },
- "resize": {
- "cpu_percent": 24.928,
- "instructions_per_s": 323827678,
- "cycles_per_s": 190003921,
- "ghz_user": 0.762,
- "rss_anon_kb": 49828,
- "voluntary_switches_per_s": 216.7
- },
- "fullscreen": {
- "cpu_percent": 45.109,
- "instructions_per_s": 43748848,
- "cycles_per_s": 299540243,
- "ghz_user": 0.664,
- "rss_anon_kb": 57684,
- "voluntary_switches_per_s": 97.0
- },
- "zoom_85": {
- "cpu_percent": 10.55,
- "instructions_per_s": 57128765,
- "cycles_per_s": 61940786,
- "ghz_user": 0.587,
- "rss_anon_kb": 57684,
- "voluntary_switches_per_s": 185.7
- },
- "zoom_70": {
- "cpu_percent": 10.623,
- "instructions_per_s": 58129369,
- "cycles_per_s": 60524140,
- "ghz_user": 0.57,
- "rss_anon_kb": 58160,
- "voluntary_switches_per_s": 185.7
- },
- "zoom_55": {
- "cpu_percent": 11.195,
- "instructions_per_s": 57363485,
- "cycles_per_s": 60243443,
- "ghz_user": 0.538,
- "rss_anon_kb": 58160,
- "voluntary_switches_per_s": 189.5
- },
- "zoom_min_hold": {
- "cpu_percent": 8.573,
- "instructions_per_s": 37497494,
- "cycles_per_s": 45243922,
- "ghz_user": 0.528,
- "rss_anon_kb": 58328,
- "voluntary_switches_per_s": 188.7
- }
- },
- "mixed": {
- "idle": {
- "cpu_percent": 0.003,
- "instructions_per_s": 151,
- "cycles_per_s": 2715,
- "ghz_user": 0.078,
- "rss_anon_kb": 48636,
- "voluntary_switches_per_s": 0.6
- },
- "spinner_clear": {
- "cpu_percent": 10.688,
- "instructions_per_s": 42278138,
- "cycles_per_s": 54406976,
- "ghz_user": 0.509,
- "rss_anon_kb": 53136,
- "voluntary_switches_per_s": 220.0
- },
- "spinner_glass": {
- "cpu_percent": 14.425,
- "instructions_per_s": 73362751,
- "cycles_per_s": 75989196,
- "ghz_user": 0.527,
- "rss_anon_kb": 53136,
- "voluntary_switches_per_s": 183.5
- },
- "damage_full": {
- "cpu_percent": 17.476,
- "instructions_per_s": 78105395,
- "cycles_per_s": 106553077,
- "ghz_user": 0.61,
- "rss_anon_kb": 53136,
- "voluntary_switches_per_s": 184.0
- },
- "drag": {
- "cpu_percent": 8.758,
- "instructions_per_s": 58683959,
- "cycles_per_s": 65049722,
- "ghz_user": 0.743,
- "rss_anon_kb": 53136,
- "voluntary_switches_per_s": 175.6
- },
- "resize": {
- "cpu_percent": 33.763,
- "instructions_per_s": 367495870,
- "cycles_per_s": 244220332,
- "ghz_user": 0.723,
- "rss_anon_kb": 53136,
- "voluntary_switches_per_s": 208.5
- },
- "fullscreen": {
- "cpu_percent": 39.625,
- "instructions_per_s": 57228872,
- "cycles_per_s": 253486234,
- "ghz_user": 0.64,
- "rss_anon_kb": 58092,
- "voluntary_switches_per_s": 112.2
- },
- "zoom_85": {
- "cpu_percent": 13.526,
- "instructions_per_s": 74599215,
- "cycles_per_s": 78374593,
- "ghz_user": 0.579,
- "rss_anon_kb": 58092,
- "voluntary_switches_per_s": 184.2
- },
- "zoom_70": {
- "cpu_percent": 13.539,
- "instructions_per_s": 64878633,
- "cycles_per_s": 73783231,
- "ghz_user": 0.545,
- "rss_anon_kb": 58328,
- "voluntary_switches_per_s": 212.0
- },
- "zoom_55": {
- "cpu_percent": 13.571,
- "instructions_per_s": 64536169,
- "cycles_per_s": 71642560,
- "ghz_user": 0.528,
- "rss_anon_kb": 58328,
- "voluntary_switches_per_s": 206.7
- },
- "zoom_min_hold": {
- "cpu_percent": 11.204,
- "instructions_per_s": 43904947,
- "cycles_per_s": 58457191,
- "ghz_user": 0.522,
- "rss_anon_kb": 58328,
- "voluntary_switches_per_s": 241.2
- }
- },
- "mixed_noglass": {
- "idle": {
- "cpu_percent": 0.107,
- "instructions_per_s": 469149,
- "cycles_per_s": 436734,
- "ghz_user": 0.409,
- "rss_anon_kb": 47096,
- "voluntary_switches_per_s": 4.6
- },
- "spinner_clear": {
- "cpu_percent": 10.298,
- "instructions_per_s": 35373664,
- "cycles_per_s": 52937572,
- "ghz_user": 0.514,
- "rss_anon_kb": 51700,
- "voluntary_switches_per_s": 226.7
- },
- "spinner_glass": {
- "cpu_percent": 10.245,
- "instructions_per_s": 37305311,
- "cycles_per_s": 59565790,
- "ghz_user": 0.581,
- "rss_anon_kb": 51700,
- "voluntary_switches_per_s": 242.5
- },
- "damage_full": {
- "cpu_percent": 14.62,
- "instructions_per_s": 40136219,
- "cycles_per_s": 83463878,
- "ghz_user": 0.571,
- "rss_anon_kb": 51700,
- "voluntary_switches_per_s": 219.2
- },
- "drag": {
- "cpu_percent": 7.174,
- "instructions_per_s": 39913418,
- "cycles_per_s": 48023708,
- "ghz_user": 0.669,
- "rss_anon_kb": 51700,
- "voluntary_switches_per_s": 189.9
- },
- "resize": {
- "cpu_percent": 21.95,
- "instructions_per_s": 302541432,
- "cycles_per_s": 180207738,
- "ghz_user": 0.821,
- "rss_anon_kb": 51700,
- "voluntary_switches_per_s": 226.7
- },
- "fullscreen": {
- "cpu_percent": 44.172,
- "instructions_per_s": 48311705,
- "cycles_per_s": 298529212,
- "ghz_user": 0.676,
- "rss_anon_kb": 56500,
- "voluntary_switches_per_s": 89.2
- },
- "zoom_85": {
- "cpu_percent": 9.063,
- "instructions_per_s": 38079116,
- "cycles_per_s": 51622743,
- "ghz_user": 0.57,
- "rss_anon_kb": 56500,
- "voluntary_switches_per_s": 241.7
- },
- "zoom_70": {
- "cpu_percent": 8.395,
- "instructions_per_s": 38171741,
- "cycles_per_s": 48738983,
- "ghz_user": 0.581,
- "rss_anon_kb": 56728,
- "voluntary_switches_per_s": 240.2
- },
- "zoom_55": {
- "cpu_percent": 8.631,
- "instructions_per_s": 38560596,
- "cycles_per_s": 47680939,
- "ghz_user": 0.552,
- "rss_anon_kb": 56728,
- "voluntary_switches_per_s": 242.7
- },
- "zoom_min_hold": {
- "cpu_percent": 8.988,
- "instructions_per_s": 38771062,
- "cycles_per_s": 48848839,
- "ghz_user": 0.543,
- "rss_anon_kb": 56728,
- "voluntary_switches_per_s": 238.7
- }
- }
- },
- "stats": {
- "scale1": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "projection_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.5285963388429752,
- "projection_cpu_avg_ms": 0.04075286776859504,
- "scene_commit_cpu_avg_ms": 0.23179954132231406,
- "gpu_elapsed_avg_ms": 0.25877778512396693
- },
- "spinner_glass": {
- "output_commits": 236,
- "cpu_frame_avg_ms": 0.9108663262711865,
- "projection_cpu_avg_ms": 0.04488848728813559,
- "scene_commit_cpu_avg_ms": 0.2296705466101695,
- "gpu_elapsed_avg_ms": 0.6532777076271187
- },
- "damage_full": {
- "output_commits": 236,
- "cpu_frame_avg_ms": 0.9404649194915254,
- "projection_cpu_avg_ms": 0.04331497457627119,
- "scene_commit_cpu_avg_ms": 0.25868493644067797,
- "gpu_elapsed_avg_ms": 0.7470636186440678
- },
- "drag": {
- "output_commits": 236,
- "cpu_frame_avg_ms": 1.0756459240506329,
- "projection_cpu_avg_ms": 0.09305966666666667,
- "scene_commit_cpu_avg_ms": 0.30006427426160337,
- "gpu_elapsed_avg_ms": 0.8566882881355932
- },
- "resize": {
- "output_commits": 226,
- "cpu_frame_avg_ms": 1.6377347610619468,
- "projection_cpu_avg_ms": 0.23845960176991152,
- "scene_commit_cpu_avg_ms": 0.3011534159292036,
- "gpu_elapsed_avg_ms": 1.3877622168141592
- },
- "fullscreen": {
- "output_commits": 213,
- "cpu_frame_avg_ms": 0.3899178398268398,
- "projection_cpu_avg_ms": 0.028678112554112553,
- "scene_commit_cpu_avg_ms": 0.22912180952380953,
- "gpu_elapsed_avg_ms": 0.570767
- },
- "zoom_85": {
- "output_commits": 235,
- "cpu_frame_avg_ms": 0.9995646808510638,
- "projection_cpu_avg_ms": 0.05024310212765957,
- "scene_commit_cpu_avg_ms": 0.24074969361702128,
- "gpu_elapsed_avg_ms": 0.6814638978723404
- },
- "zoom_70": {
- "output_commits": 236,
- "cpu_frame_avg_ms": 0.9755901525423729,
- "projection_cpu_avg_ms": 0.048913682203389826,
- "scene_commit_cpu_avg_ms": 0.23908729237288134,
- "gpu_elapsed_avg_ms": 0.6730475593220339
- },
- "zoom_55": {
- "output_commits": 235,
- "cpu_frame_avg_ms": 0.9745372085106383,
- "projection_cpu_avg_ms": 0.04874090212765957,
- "scene_commit_cpu_avg_ms": 0.23473417021276596,
- "gpu_elapsed_avg_ms": 0.6677903489361702
- },
- "zoom_min_hold": {
- "output_commits": 240,
- "cpu_frame_avg_ms": 0.6566562874999999,
- "projection_cpu_avg_ms": 0.05216024166666667,
- "scene_commit_cpu_avg_ms": 0.29723086666666665,
- "gpu_elapsed_avg_ms": 0.3149952166666667
- }
- },
- "scale1.5": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "projection_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.4903759049586777,
- "projection_cpu_avg_ms": 0.03821184710743802,
- "scene_commit_cpu_avg_ms": 0.21741267355371902,
- "gpu_elapsed_avg_ms": 0.23633136363636364
- },
- "spinner_glass": {
- "output_commits": 236,
- "cpu_frame_avg_ms": 0.9352046440677967,
- "projection_cpu_avg_ms": 0.046606483050847455,
- "scene_commit_cpu_avg_ms": 0.2418129872881356,
- "gpu_elapsed_avg_ms": 0.6822228093220339
- },
- "damage_full": {
- "output_commits": 236,
- "cpu_frame_avg_ms": 0.9660893347457628,
- "projection_cpu_avg_ms": 0.04348677542372881,
- "scene_commit_cpu_avg_ms": 0.29364785593220344,
- "gpu_elapsed_avg_ms": 0.8542451991525424
- },
- "drag": {
- "output_commits": 235,
- "cpu_frame_avg_ms": 1.1248709067796612,
- "projection_cpu_avg_ms": 0.10619061016949152,
- "scene_commit_cpu_avg_ms": 0.3137724406779661,
- "gpu_elapsed_avg_ms": 1.032649593220339
- },
- "resize": {
- "output_commits": 225,
- "cpu_frame_avg_ms": 1.6968621022222221,
- "projection_cpu_avg_ms": 0.23766648444444444,
- "scene_commit_cpu_avg_ms": 0.3184261066666667,
- "gpu_elapsed_avg_ms": 1.6415488755555556
- },
- "fullscreen": {
- "output_commits": 231,
- "cpu_frame_avg_ms": 0.44645474025974025,
- "projection_cpu_avg_ms": 0.034466277056277056,
- "scene_commit_cpu_avg_ms": 0.2737170822510822,
- "gpu_elapsed_avg_ms": 1.0559345584415585
- },
- "zoom_85": {
- "output_commits": 236,
- "cpu_frame_avg_ms": 0.970867279661017,
- "projection_cpu_avg_ms": 0.04691425,
- "scene_commit_cpu_avg_ms": 0.250336093220339,
- "gpu_elapsed_avg_ms": 0.7204151483050848
- },
- "zoom_70": {
- "output_commits": 236,
- "cpu_frame_avg_ms": 0.9603890635593221,
- "projection_cpu_avg_ms": 0.04664549152542373,
- "scene_commit_cpu_avg_ms": 0.2504626779661017,
- "gpu_elapsed_avg_ms": 0.6710290593220339
- },
- "zoom_55": {
- "output_commits": 235,
- "cpu_frame_avg_ms": 1.0405410638297872,
- "projection_cpu_avg_ms": 0.05203050638297872,
- "scene_commit_cpu_avg_ms": 0.25770638723404254,
- "gpu_elapsed_avg_ms": 0.7476090510638298
- },
- "zoom_min_hold": {
- "output_commits": 240,
- "cpu_frame_avg_ms": 0.6628381875,
- "projection_cpu_avg_ms": 0.051200699999999995,
- "scene_commit_cpu_avg_ms": 0.3147144416666667,
- "gpu_elapsed_avg_ms": 0.3941911166666666
- }
- },
- "mixed": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "projection_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 240,
- "cpu_frame_avg_ms": 0.44584115625,
- "projection_cpu_avg_ms": 0.0411516375,
- "scene_commit_cpu_avg_ms": 0.14317804166666664,
- "gpu_elapsed_avg_ms": 0.23094964791666667
- },
- "spinner_glass": {
- "output_commits": 468,
- "cpu_frame_avg_ms": 0.7156818952991453,
- "projection_cpu_avg_ms": 0.03914857478632479,
- "scene_commit_cpu_avg_ms": 0.20145101923076922,
- "gpu_elapsed_avg_ms": 0.5377085982905982
- },
- "damage_full": {
- "output_commits": 468,
- "cpu_frame_avg_ms": 0.7494734273504273,
- "projection_cpu_avg_ms": 0.04006622222222222,
- "scene_commit_cpu_avg_ms": 0.22775405341880342,
- "gpu_elapsed_avg_ms": 0.5927130256959315
- },
- "drag": {
- "output_commits": 472,
- "cpu_frame_avg_ms": 0.7120244071729958,
- "projection_cpu_avg_ms": 0.07734138818565402,
- "scene_commit_cpu_avg_ms": 0.1881419556962025,
- "gpu_elapsed_avg_ms": 0.523825717299578
- },
- "resize": {
- "output_commits": 436,
- "cpu_frame_avg_ms": 1.6170529701834864,
- "projection_cpu_avg_ms": 0.1684337224770642,
- "scene_commit_cpu_avg_ms": 0.2983888325688073,
- "gpu_elapsed_avg_ms": 1.4503752133027523
- },
- "fullscreen": {
- "output_commits": 426,
- "cpu_frame_avg_ms": 0.45592349772727275,
- "projection_cpu_avg_ms": 0.022934118181818182,
- "scene_commit_cpu_avg_ms": 0.167067,
- "gpu_elapsed_avg_ms": 0.4616003727272727
- },
- "zoom_85": {
- "output_commits": 468,
- "cpu_frame_avg_ms": 0.7094902585470085,
- "projection_cpu_avg_ms": 0.03769521153846154,
- "scene_commit_cpu_avg_ms": 0.20059735042735044,
- "gpu_elapsed_avg_ms": 0.5346703739316239
- },
- "zoom_70": {
- "output_commits": 239,
- "cpu_frame_avg_ms": 0.6409023619246862,
- "projection_cpu_avg_ms": 0.035782564853556485,
- "scene_commit_cpu_avg_ms": 0.1921735481171548,
- "gpu_elapsed_avg_ms": 0.475993
- },
- "zoom_55": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.6254356673596674,
- "projection_cpu_avg_ms": 0.038079553014553014,
- "scene_commit_cpu_avg_ms": 0.12869329729729728,
- "gpu_elapsed_avg_ms": 0.41732718918918915
- },
- "zoom_min_hold": {
- "output_commits": 250,
- "cpu_frame_avg_ms": 0.4314608858921162,
- "projection_cpu_avg_ms": 0.03770901867219917,
- "scene_commit_cpu_avg_ms": 0.15824129460580913,
- "gpu_elapsed_avg_ms": 0.19658592323651453
- }
- },
- "mixed_noglass": {
- "idle": {
- "output_commits": 2,
- "cpu_frame_avg_ms": 0.7156975,
- "projection_cpu_avg_ms": 0.02507525,
- "scene_commit_cpu_avg_ms": 0.16208925,
- "gpu_elapsed_avg_ms": 0.16132825
- },
- "spinner_clear": {
- "output_commits": 243,
- "cpu_frame_avg_ms": 0.3196651200828158,
- "projection_cpu_avg_ms": 0.02998968530020704,
- "scene_commit_cpu_avg_ms": 0.11531784679089027,
- "gpu_elapsed_avg_ms": 0.1212986314699793
- },
- "spinner_glass": {
- "output_commits": 243,
- "cpu_frame_avg_ms": 0.3165012582644628,
- "projection_cpu_avg_ms": 0.028463378099173556,
- "scene_commit_cpu_avg_ms": 0.11745335123966943,
- "gpu_elapsed_avg_ms": 0.12135295041322314
- },
- "damage_full": {
- "output_commits": 243,
- "cpu_frame_avg_ms": 0.3051557809917355,
- "projection_cpu_avg_ms": 0.02729665082644628,
- "scene_commit_cpu_avg_ms": 0.11846805578512397,
- "gpu_elapsed_avg_ms": 0.14270206611570246
- },
- "drag": {
- "output_commits": 486,
- "cpu_frame_avg_ms": 0.3764634979508197,
- "projection_cpu_avg_ms": 0.054439764344262294,
- "scene_commit_cpu_avg_ms": 0.16774485450819673,
- "gpu_elapsed_avg_ms": 0.24405757786885246
- },
- "resize": {
- "output_commits": 476,
- "cpu_frame_avg_ms": 0.4670784054621849,
- "projection_cpu_avg_ms": 0.11830837815126051,
- "scene_commit_cpu_avg_ms": 0.23319727100840337,
- "gpu_elapsed_avg_ms": 0.3154590924369748
- },
- "fullscreen": {
- "output_commits": 394,
- "cpu_frame_avg_ms": 0.26734135745614035,
- "projection_cpu_avg_ms": 0.020334708333333333,
- "scene_commit_cpu_avg_ms": 0.14632120833333334,
- "gpu_elapsed_avg_ms": 0.25581286842105266
- },
- "zoom_85": {
- "output_commits": 257,
- "cpu_frame_avg_ms": 0.32096954226804125,
- "projection_cpu_avg_ms": 0.026676589690721647,
- "scene_commit_cpu_avg_ms": 0.12753454639175257,
- "gpu_elapsed_avg_ms": 0.1312161670103093
- },
- "zoom_70": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.36473413457556936,
- "projection_cpu_avg_ms": 0.030576768115942028,
- "scene_commit_cpu_avg_ms": 0.14237068115942028,
- "gpu_elapsed_avg_ms": 0.1564261265560166
- },
- "zoom_55": {
- "output_commits": 243,
- "cpu_frame_avg_ms": 0.32039546169772254,
- "projection_cpu_avg_ms": 0.028124587991718426,
- "scene_commit_cpu_avg_ms": 0.12438115527950311,
- "gpu_elapsed_avg_ms": 0.12616279875518674
- },
- "zoom_min_hold": {
- "output_commits": 252,
- "cpu_frame_avg_ms": 0.32001391546391755,
- "projection_cpu_avg_ms": 0.026729315463917526,
- "scene_commit_cpu_avg_ms": 0.12258818350515464,
- "gpu_elapsed_avg_ms": 0.13080389484536084
- }
- }
- }
- },
- "4e-b": {
- "meta": {
- "binary_bytes": 26905016,
- "kernel": "7.2.9-zen1-1-zen",
- "cpu": "12th Gen Intel(R) Core(TM) i9-12900H",
- "pinned_cpus": [
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9
- ],
- "render_device": "/dev/dri/renderD128",
- "seconds": 4.0,
- "power": {
- "ac_online": true,
- "battery": "Not charging",
- "platform_profile": "performance",
- "governor": "schedutil",
- "epp": "performance",
- "no_turbo": "0"
- },
- "date": "2026-10-10 16:05:32"
- },
- "clean": {
- "scale1": {
- "idle": {
- "cpu_percent": 0.001,
- "instructions_per_s": 142,
- "cycles_per_s": 2577,
- "ghz_user": 0.211,
- "rss_anon_kb": 45848,
- "voluntary_switches_per_s": 0.4
- },
- "spinner_clear": {
- "cpu_percent": 8.055,
- "instructions_per_s": 35496031,
- "cycles_per_s": 48136640,
- "ghz_user": 0.598,
- "rss_anon_kb": 46440,
- "voluntary_switches_per_s": 189.7
- },
- "spinner_glass": {
- "cpu_percent": 10.253,
- "instructions_per_s": 55635349,
- "cycles_per_s": 64954940,
- "ghz_user": 0.634,
- "rss_anon_kb": 46472,
- "voluntary_switches_per_s": 185.2
- },
- "damage_full": {
- "cpu_percent": 13.101,
- "instructions_per_s": 59059000,
- "cycles_per_s": 94561341,
- "ghz_user": 0.722,
- "rss_anon_kb": 46472,
- "voluntary_switches_per_s": 184.7
- },
- "drag": {
- "cpu_percent": 6.952,
- "instructions_per_s": 50431919,
- "cycles_per_s": 52908016,
- "ghz_user": 0.761,
- "rss_anon_kb": 46472,
- "voluntary_switches_per_s": 162.6
- },
- "resize": {
- "cpu_percent": 20.484,
- "instructions_per_s": 197634647,
- "cycles_per_s": 149813111,
- "ghz_user": 0.731,
- "rss_anon_kb": 46584,
- "voluntary_switches_per_s": 221.5
- },
- "fullscreen": {
- "cpu_percent": 37.941,
- "instructions_per_s": 43809681,
- "cycles_per_s": 325109232,
- "ghz_user": 0.857,
- "rss_anon_kb": 50456,
- "voluntary_switches_per_s": 126.7
- },
- "zoom_85": {
- "cpu_percent": 9.748,
- "instructions_per_s": 55222828,
- "cycles_per_s": 65403635,
- "ghz_user": 0.671,
- "rss_anon_kb": 50456,
- "voluntary_switches_per_s": 185.7
- },
- "zoom_70": {
- "cpu_percent": 10.478,
- "instructions_per_s": 55352680,
- "cycles_per_s": 64029530,
- "ghz_user": 0.611,
- "rss_anon_kb": 50592,
- "voluntary_switches_per_s": 184.5
- },
- "zoom_55": {
- "cpu_percent": 9.862,
- "instructions_per_s": 55146006,
- "cycles_per_s": 63717511,
- "ghz_user": 0.646,
- "rss_anon_kb": 50592,
- "voluntary_switches_per_s": 185.5
- },
- "zoom_min_hold": {
- "cpu_percent": 8.771,
- "instructions_per_s": 37124488,
- "cycles_per_s": 48970900,
- "ghz_user": 0.558,
- "rss_anon_kb": 50916,
- "voluntary_switches_per_s": 188.0
- }
- },
- "scale1.5": {
- "idle": {
- "cpu_percent": 0.002,
- "instructions_per_s": 146,
- "cycles_per_s": 3042,
- "ghz_user": 0.176,
- "rss_anon_kb": 48732,
- "voluntary_switches_per_s": 0.4
- },
- "spinner_clear": {
- "cpu_percent": 7.545,
- "instructions_per_s": 35763253,
- "cycles_per_s": 48134223,
- "ghz_user": 0.638,
- "rss_anon_kb": 49284,
- "voluntary_switches_per_s": 189.7
- },
- "spinner_glass": {
- "cpu_percent": 10.067,
- "instructions_per_s": 57776285,
- "cycles_per_s": 63820830,
- "ghz_user": 0.634,
- "rss_anon_kb": 49284,
- "voluntary_switches_per_s": 184.2
- },
- "damage_full": {
- "cpu_percent": 14.202,
- "instructions_per_s": 64260131,
- "cycles_per_s": 88409083,
- "ghz_user": 0.623,
- "rss_anon_kb": 49496,
- "voluntary_switches_per_s": 183.7
- },
- "drag": {
- "cpu_percent": 8.053,
- "instructions_per_s": 51929592,
- "cycles_per_s": 53625641,
- "ghz_user": 0.666,
- "rss_anon_kb": 49656,
- "voluntary_switches_per_s": 161.9
- },
- "resize": {
- "cpu_percent": 23.927,
- "instructions_per_s": 323840581,
- "cycles_per_s": 198800849,
- "ghz_user": 0.831,
- "rss_anon_kb": 50100,
- "voluntary_switches_per_s": 218.0
- },
- "fullscreen": {
- "cpu_percent": 37.426,
- "instructions_per_s": 44763161,
- "cycles_per_s": 317702349,
- "ghz_user": 0.849,
- "rss_anon_kb": 58376,
- "voluntary_switches_per_s": 129.7
- },
- "zoom_85": {
- "cpu_percent": 10.207,
- "instructions_per_s": 57246464,
- "cycles_per_s": 68846592,
- "ghz_user": 0.675,
- "rss_anon_kb": 58376,
- "voluntary_switches_per_s": 185.5
- },
- "zoom_70": {
- "cpu_percent": 11.022,
- "instructions_per_s": 58408842,
- "cycles_per_s": 63857994,
- "ghz_user": 0.579,
- "rss_anon_kb": 58404,
- "voluntary_switches_per_s": 185.2
- },
- "zoom_55": {
- "cpu_percent": 10.829,
- "instructions_per_s": 57299049,
- "cycles_per_s": 73051206,
- "ghz_user": 0.675,
- "rss_anon_kb": 58404,
- "voluntary_switches_per_s": 185.7
- },
- "zoom_min_hold": {
- "cpu_percent": 10.503,
- "instructions_per_s": 37378421,
- "cycles_per_s": 48839578,
- "ghz_user": 0.465,
- "rss_anon_kb": 58572,
- "voluntary_switches_per_s": 187.5
- }
- },
- "mixed": {
- "idle": {
- "cpu_percent": 0.006,
- "instructions_per_s": 7861,
- "cycles_per_s": 11521,
- "ghz_user": 0.178,
- "rss_anon_kb": 49204,
- "voluntary_switches_per_s": 1.2
- },
- "spinner_clear": {
- "cpu_percent": 8.805,
- "instructions_per_s": 44765586,
- "cycles_per_s": 55191763,
- "ghz_user": 0.627,
- "rss_anon_kb": 53796,
- "voluntary_switches_per_s": 242.7
- },
- "spinner_glass": {
- "cpu_percent": 11.818,
- "instructions_per_s": 74096859,
- "cycles_per_s": 73752575,
- "ghz_user": 0.624,
- "rss_anon_kb": 53796,
- "voluntary_switches_per_s": 187.0
- },
- "damage_full": {
- "cpu_percent": 15.561,
- "instructions_per_s": 78886993,
- "cycles_per_s": 102156000,
- "ghz_user": 0.656,
- "rss_anon_kb": 53796,
- "voluntary_switches_per_s": 188.7
- },
- "drag": {
- "cpu_percent": 8.2,
- "instructions_per_s": 58639881,
- "cycles_per_s": 59579227,
- "ghz_user": 0.727,
- "rss_anon_kb": 53796,
- "voluntary_switches_per_s": 172.0
- },
- "resize": {
- "cpu_percent": 29.436,
- "instructions_per_s": 369861668,
- "cycles_per_s": 231226815,
- "ghz_user": 0.786,
- "rss_anon_kb": 53796,
- "voluntary_switches_per_s": 212.0
- },
- "fullscreen": {
- "cpu_percent": 42.933,
- "instructions_per_s": 75782473,
- "cycles_per_s": 324726067,
- "ghz_user": 0.756,
- "rss_anon_kb": 58604,
- "voluntary_switches_per_s": 101.0
- },
- "zoom_85": {
- "cpu_percent": 11.87,
- "instructions_per_s": 75204315,
- "cycles_per_s": 74595767,
- "ghz_user": 0.628,
- "rss_anon_kb": 58604,
- "voluntary_switches_per_s": 185.7
- },
- "zoom_70": {
- "cpu_percent": 10.558,
- "instructions_per_s": 62809934,
- "cycles_per_s": 74261385,
- "ghz_user": 0.703,
- "rss_anon_kb": 59012,
- "voluntary_switches_per_s": 205.7
- },
- "zoom_55": {
- "cpu_percent": 10.876,
- "instructions_per_s": 62845021,
- "cycles_per_s": 76811242,
- "ghz_user": 0.706,
- "rss_anon_kb": 59012,
- "voluntary_switches_per_s": 210.7
- },
- "zoom_min_hold": {
- "cpu_percent": 8.135,
- "instructions_per_s": 43570611,
- "cycles_per_s": 57296446,
- "ghz_user": 0.704,
- "rss_anon_kb": 59012,
- "voluntary_switches_per_s": 242.0
- }
- },
- "mixed_noglass": {
- "idle": {
- "cpu_percent": 0.004,
- "instructions_per_s": 2721,
- "cycles_per_s": 5895,
- "ghz_user": 0.146,
- "rss_anon_kb": 48044,
- "voluntary_switches_per_s": 0.8
- },
- "spinner_clear": {
- "cpu_percent": 8.593,
- "instructions_per_s": 35771532,
- "cycles_per_s": 52578727,
- "ghz_user": 0.612,
- "rss_anon_kb": 52648,
- "voluntary_switches_per_s": 245.0
- },
- "spinner_glass": {
- "cpu_percent": 9.091,
- "instructions_per_s": 37428692,
- "cycles_per_s": 47944626,
- "ghz_user": 0.527,
- "rss_anon_kb": 52648,
- "voluntary_switches_per_s": 243.0
- },
- "damage_full": {
- "cpu_percent": 13.806,
- "instructions_per_s": 40291777,
- "cycles_per_s": 82140426,
- "ghz_user": 0.595,
- "rss_anon_kb": 52648,
- "voluntary_switches_per_s": 242.5
- },
- "drag": {
- "cpu_percent": 5.503,
- "instructions_per_s": 40713852,
- "cycles_per_s": 45356781,
- "ghz_user": 0.824,
- "rss_anon_kb": 52648,
- "voluntary_switches_per_s": 199.2
- },
- "resize": {
- "cpu_percent": 22.311,
- "instructions_per_s": 302661540,
- "cycles_per_s": 175977221,
- "ghz_user": 0.789,
- "rss_anon_kb": 52648,
- "voluntary_switches_per_s": 230.7
- },
- "fullscreen": {
- "cpu_percent": 28.823,
- "instructions_per_s": 29509208,
- "cycles_per_s": 177478991,
- "ghz_user": 0.616,
- "rss_anon_kb": 57200,
- "voluntary_switches_per_s": 153.7
- },
- "zoom_85": {
- "cpu_percent": 9.591,
- "instructions_per_s": 38066424,
- "cycles_per_s": 51642176,
- "ghz_user": 0.538,
- "rss_anon_kb": 57200,
- "voluntary_switches_per_s": 244.5
- },
- "zoom_70": {
- "cpu_percent": 9.783,
- "instructions_per_s": 38075704,
- "cycles_per_s": 52742130,
- "ghz_user": 0.539,
- "rss_anon_kb": 57624,
- "voluntary_switches_per_s": 243.7
- },
- "zoom_55": {
- "cpu_percent": 10.386,
- "instructions_per_s": 38464596,
- "cycles_per_s": 54140845,
- "ghz_user": 0.521,
- "rss_anon_kb": 57624,
- "voluntary_switches_per_s": 236.0
- },
- "zoom_min_hold": {
- "cpu_percent": 10.781,
- "instructions_per_s": 38667704,
- "cycles_per_s": 52929675,
- "ghz_user": 0.491,
- "rss_anon_kb": 57624,
- "voluntary_switches_per_s": 228.5
- }
- }
- },
- "stats": {
- "scale1": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "projection_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.5653517593360996,
- "projection_cpu_avg_ms": 0.04531471369294606,
- "scene_commit_cpu_avg_ms": 0.24653418672199168,
- "gpu_elapsed_avg_ms": 0.27835154356846475
- },
- "spinner_glass": {
- "output_commits": 236,
- "cpu_frame_avg_ms": 0.9310601949152543,
- "projection_cpu_avg_ms": 0.043754966101694916,
- "scene_commit_cpu_avg_ms": 0.24077320338983052,
- "gpu_elapsed_avg_ms": 0.6734461016949153
- },
- "damage_full": {
- "output_commits": 236,
- "cpu_frame_avg_ms": 0.9049291652542373,
- "projection_cpu_avg_ms": 0.03974909745762712,
- "scene_commit_cpu_avg_ms": 0.24993713983050847,
- "gpu_elapsed_avg_ms": 0.7339066567796609
- },
- "drag": {
- "output_commits": 238,
- "cpu_frame_avg_ms": 0.9277844979079498,
- "projection_cpu_avg_ms": 0.08195161087866108,
- "scene_commit_cpu_avg_ms": 0.26181355230125525,
- "gpu_elapsed_avg_ms": 0.7981407029288703
- },
- "resize": {
- "output_commits": 229,
- "cpu_frame_avg_ms": 1.4558886113537117,
- "projection_cpu_avg_ms": 0.19630113537117902,
- "scene_commit_cpu_avg_ms": 0.269611288209607,
- "gpu_elapsed_avg_ms": 1.3057364366812227
- },
- "fullscreen": {
- "output_commits": 224,
- "cpu_frame_avg_ms": 0.38411280086580085,
- "projection_cpu_avg_ms": 0.026982926406926407,
- "scene_commit_cpu_avg_ms": 0.23104855411255412,
- "gpu_elapsed_avg_ms": 0.586290380952381
- },
- "zoom_85": {
- "output_commits": 237,
- "cpu_frame_avg_ms": 0.8402020801687763,
- "projection_cpu_avg_ms": 0.03953949789029536,
- "scene_commit_cpu_avg_ms": 0.20540969198312234,
- "gpu_elapsed_avg_ms": 0.5912827552742616
- },
- "zoom_70": {
- "output_commits": 237,
- "cpu_frame_avg_ms": 0.843226911392405,
- "projection_cpu_avg_ms": 0.041138654008438816,
- "scene_commit_cpu_avg_ms": 0.20869937130801688,
- "gpu_elapsed_avg_ms": 0.6070062447257384
- },
- "zoom_55": {
- "output_commits": 238,
- "cpu_frame_avg_ms": 0.8025031050420168,
- "projection_cpu_avg_ms": 0.03953345798319328,
- "scene_commit_cpu_avg_ms": 0.1936595,
- "gpu_elapsed_avg_ms": 0.5667463067226891
- },
- "zoom_min_hold": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.5214591404958677,
- "projection_cpu_avg_ms": 0.03941836363636364,
- "scene_commit_cpu_avg_ms": 0.2517156818181818,
- "gpu_elapsed_avg_ms": 0.26346097107438016
- }
- },
- "scale1.5": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "projection_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.6069629336099585,
- "projection_cpu_avg_ms": 0.05209474273858922,
- "scene_commit_cpu_avg_ms": 0.2583033900414938,
- "gpu_elapsed_avg_ms": 0.3258097842323651
- },
- "spinner_glass": {
- "output_commits": 234,
- "cpu_frame_avg_ms": 1.0702079017094017,
- "projection_cpu_avg_ms": 0.05163961538461538,
- "scene_commit_cpu_avg_ms": 0.27825818803418806,
- "gpu_elapsed_avg_ms": 0.7465099487179487
- },
- "damage_full": {
- "output_commits": 230,
- "cpu_frame_avg_ms": 1.4471948565217392,
- "projection_cpu_avg_ms": 0.06699368260869566,
- "scene_commit_cpu_avg_ms": 0.43221919565217387,
- "gpu_elapsed_avg_ms": 1.2460132576419214
- },
- "drag": {
- "output_commits": 232,
- "cpu_frame_avg_ms": 1.3712287596566524,
- "projection_cpu_avg_ms": 0.12573930901287556,
- "scene_commit_cpu_avg_ms": 0.38648377682403434,
- "gpu_elapsed_avg_ms": 1.19827052360515
- },
- "resize": {
- "output_commits": 211,
- "cpu_frame_avg_ms": 2.6373328341232227,
- "projection_cpu_avg_ms": 0.345584990521327,
- "scene_commit_cpu_avg_ms": 0.5224245639810426,
- "gpu_elapsed_avg_ms": 2.3331037440758293
- },
- "fullscreen": {
- "output_commits": 228,
- "cpu_frame_avg_ms": 0.4230383245614035,
- "projection_cpu_avg_ms": 0.031294802631578945,
- "scene_commit_cpu_avg_ms": 0.26043456578947366,
- "gpu_elapsed_avg_ms": 1.0385176211453744
- },
- "zoom_85": {
- "output_commits": 236,
- "cpu_frame_avg_ms": 0.9115731949152542,
- "projection_cpu_avg_ms": 0.0430528686440678,
- "scene_commit_cpu_avg_ms": 0.23460040254237288,
- "gpu_elapsed_avg_ms": 0.6585261822033899
- },
- "zoom_70": {
- "output_commits": 235,
- "cpu_frame_avg_ms": 1.0086708425531914,
- "projection_cpu_avg_ms": 0.04791980425531915,
- "scene_commit_cpu_avg_ms": 0.2684744893617021,
- "gpu_elapsed_avg_ms": 0.7265079489361702
- },
- "zoom_55": {
- "output_commits": 236,
- "cpu_frame_avg_ms": 0.9537003771186441,
- "projection_cpu_avg_ms": 0.04526302118644068,
- "scene_commit_cpu_avg_ms": 0.2455561313559322,
- "gpu_elapsed_avg_ms": 0.6866003872340425
- },
- "zoom_min_hold": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.5249780247933884,
- "projection_cpu_avg_ms": 0.03946980578512396,
- "scene_commit_cpu_avg_ms": 0.25415130578512396,
- "gpu_elapsed_avg_ms": 0.2684265413223141
- }
- },
- "mixed": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "projection_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 243,
- "cpu_frame_avg_ms": 0.3388376446280992,
- "projection_cpu_avg_ms": 0.03077439256198347,
- "scene_commit_cpu_avg_ms": 0.10894826239669422,
- "gpu_elapsed_avg_ms": 0.13202805785123967
- },
- "spinner_glass": {
- "output_commits": 476,
- "cpu_frame_avg_ms": 0.5079750945378151,
- "projection_cpu_avg_ms": 0.027539105042016808,
- "scene_commit_cpu_avg_ms": 0.14358581722689076,
- "gpu_elapsed_avg_ms": 0.373972968487395
- },
- "damage_full": {
- "output_commits": 474,
- "cpu_frame_avg_ms": 0.564612947257384,
- "projection_cpu_avg_ms": 0.029161521097046415,
- "scene_commit_cpu_avg_ms": 0.17262666666666665,
- "gpu_elapsed_avg_ms": 0.447193
- },
- "drag": {
- "output_commits": 478,
- "cpu_frame_avg_ms": 0.5828348874999999,
- "projection_cpu_avg_ms": 0.06288575833333333,
- "scene_commit_cpu_avg_ms": 0.15800696041666668,
- "gpu_elapsed_avg_ms": 0.4360062791666667
- },
- "resize": {
- "output_commits": 444,
- "cpu_frame_avg_ms": 1.441921301801802,
- "projection_cpu_avg_ms": 0.1501733873873874,
- "scene_commit_cpu_avg_ms": 0.26796232207207205,
- "gpu_elapsed_avg_ms": 1.3124508581081082
- },
- "fullscreen": {
- "output_commits": 252,
- "cpu_frame_avg_ms": 0.38168840563991324,
- "projection_cpu_avg_ms": 0.026610360086767895,
- "scene_commit_cpu_avg_ms": 0.11245011279826464,
- "gpu_elapsed_avg_ms": 0.31509309327548807
- },
- "zoom_85": {
- "output_commits": 473,
- "cpu_frame_avg_ms": 0.6040536109936575,
- "projection_cpu_avg_ms": 0.03302901268498943,
- "scene_commit_cpu_avg_ms": 0.17264776109936575,
- "gpu_elapsed_avg_ms": 0.44300564904862577
- },
- "zoom_70": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.5373983850931676,
- "projection_cpu_avg_ms": 0.03114400414078675,
- "scene_commit_cpu_avg_ms": 0.14353820703933745,
- "gpu_elapsed_avg_ms": 0.3713746950207469
- },
- "zoom_55": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.538529395010395,
- "projection_cpu_avg_ms": 0.03292812681912682,
- "scene_commit_cpu_avg_ms": 0.11690093762993763,
- "gpu_elapsed_avg_ms": 0.37831262993762993
- },
- "zoom_min_hold": {
- "output_commits": 251,
- "cpu_frame_avg_ms": 0.38058453734439834,
- "projection_cpu_avg_ms": 0.03549269294605809,
- "scene_commit_cpu_avg_ms": 0.14208104564315352,
- "gpu_elapsed_avg_ms": 0.17047645850622406
- }
- },
- "mixed_noglass": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "projection_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.3454650622406639,
- "projection_cpu_avg_ms": 0.03219763070539419,
- "scene_commit_cpu_avg_ms": 0.12554640248962656,
- "gpu_elapsed_avg_ms": 0.1352698215767635
- },
- "spinner_glass": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.3762960684647303,
- "projection_cpu_avg_ms": 0.03349408091286307,
- "scene_commit_cpu_avg_ms": 0.14022993775933612,
- "gpu_elapsed_avg_ms": 0.14816757676348546
- },
- "damage_full": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.38445889004149375,
- "projection_cpu_avg_ms": 0.03551187966804979,
- "scene_commit_cpu_avg_ms": 0.15614063485477178,
- "gpu_elapsed_avg_ms": 0.2114741307053942
- },
- "drag": {
- "output_commits": 486,
- "cpu_frame_avg_ms": 0.4112300983606557,
- "projection_cpu_avg_ms": 0.06114378483606558,
- "scene_commit_cpu_avg_ms": 0.17733923155737705,
- "gpu_elapsed_avg_ms": 0.2761258893442623
- },
- "resize": {
- "output_commits": 472,
- "cpu_frame_avg_ms": 0.5934543432203391,
- "projection_cpu_avg_ms": 0.1532497838983051,
- "scene_commit_cpu_avg_ms": 0.2910591673728814,
- "gpu_elapsed_avg_ms": 0.375966531779661
- },
- "fullscreen": {
- "output_commits": 342,
- "cpu_frame_avg_ms": 0.24195559442060086,
- "projection_cpu_avg_ms": 0.01893879399141631,
- "scene_commit_cpu_avg_ms": 0.12075638626609442,
- "gpu_elapsed_avg_ms": 0.24823286695278968
- },
- "zoom_85": {
- "output_commits": 256,
- "cpu_frame_avg_ms": 0.31432241322314053,
- "projection_cpu_avg_ms": 0.027343299586776858,
- "scene_commit_cpu_avg_ms": 0.1256931632231405,
- "gpu_elapsed_avg_ms": 0.13670261983471077
- },
- "zoom_70": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.4003629958419958,
- "projection_cpu_avg_ms": 0.0371126133056133,
- "scene_commit_cpu_avg_ms": 0.1589673451143451,
- "gpu_elapsed_avg_ms": 0.16830882708333333
- },
- "zoom_55": {
- "output_commits": 240,
- "cpu_frame_avg_ms": 0.39223885208333337,
- "projection_cpu_avg_ms": 0.03705194583333333,
- "scene_commit_cpu_avg_ms": 0.15851032916666666,
- "gpu_elapsed_avg_ms": 0.20327539374999998
- },
- "zoom_min_hold": {
- "output_commits": 252,
- "cpu_frame_avg_ms": 0.38945681573498964,
- "projection_cpu_avg_ms": 0.03499250724637681,
- "scene_commit_cpu_avg_ms": 0.1474158861283644,
- "gpu_elapsed_avg_ms": 0.16345689855072465
- }
- }
- }
- },
- "stage0-b": {
- "meta": {
- "binary_bytes": 26769600,
- "kernel": "7.2.9-zen1-1-zen",
- "cpu": "12th Gen Intel(R) Core(TM) i9-12900H",
- "pinned_cpus": [
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9
- ],
- "render_device": "/dev/dri/renderD128",
- "seconds": 4.0,
- "power": {
- "ac_online": true,
- "battery": "Not charging",
- "platform_profile": "performance",
- "governor": "schedutil",
- "epp": "performance",
- "no_turbo": "0"
- },
- "date": "2026-10-10 16:13:11"
- },
- "clean": {
- "scale1": {
- "idle": {
- "cpu_percent": 0.007,
- "instructions_per_s": 7289,
- "cycles_per_s": 15614,
- "ghz_user": 0.231,
- "rss_anon_kb": 44004,
- "voluntary_switches_per_s": 0.8
- },
- "spinner_clear": {
- "cpu_percent": 11.441,
- "instructions_per_s": 37109926,
- "cycles_per_s": 45552633,
- "ghz_user": 0.398,
- "rss_anon_kb": 44648,
- "voluntary_switches_per_s": 188.7
- },
- "spinner_glass": {
- "cpu_percent": 15.331,
- "instructions_per_s": 65525628,
- "cycles_per_s": 68264768,
- "ghz_user": 0.445,
- "rss_anon_kb": 44756,
- "voluntary_switches_per_s": 182.5
- },
- "damage_full": {
- "cpu_percent": 29.176,
- "instructions_per_s": 84470002,
- "cycles_per_s": 142171181,
- "ghz_user": 0.487,
- "rss_anon_kb": 44756,
- "voluntary_switches_per_s": 620.5
- },
- "drag": {
- "cpu_percent": 9.933,
- "instructions_per_s": 71014152,
- "cycles_per_s": 62663628,
- "ghz_user": 0.631,
- "rss_anon_kb": 44764,
- "voluntary_switches_per_s": 159.1
- },
- "resize": {
- "cpu_percent": 32.978,
- "instructions_per_s": 297676011,
- "cycles_per_s": 213330898,
- "ghz_user": 0.647,
- "rss_anon_kb": 44788,
- "voluntary_switches_per_s": 314.0
- },
- "fullscreen": {
- "cpu_percent": 48.557,
- "instructions_per_s": 59248290,
- "cycles_per_s": 324095506,
- "ghz_user": 0.667,
- "rss_anon_kb": 48668,
- "voluntary_switches_per_s": 70.0
- },
- "zoom_85": {
- "cpu_percent": 10.913,
- "instructions_per_s": 64379328,
- "cycles_per_s": 63094720,
- "ghz_user": 0.578,
- "rss_anon_kb": 48668,
- "voluntary_switches_per_s": 185.7
- },
- "zoom_70": {
- "cpu_percent": 10.183,
- "instructions_per_s": 66839283,
- "cycles_per_s": 62387900,
- "ghz_user": 0.613,
- "rss_anon_kb": 48720,
- "voluntary_switches_per_s": 186.2
- },
- "zoom_55": {
- "cpu_percent": 11.289,
- "instructions_per_s": 64252073,
- "cycles_per_s": 63850266,
- "ghz_user": 0.566,
- "rss_anon_kb": 48720,
- "voluntary_switches_per_s": 185.5
- },
- "zoom_min_hold": {
- "cpu_percent": 8.884,
- "instructions_per_s": 38297602,
- "cycles_per_s": 48102809,
- "ghz_user": 0.541,
- "rss_anon_kb": 49044,
- "voluntary_switches_per_s": 188.5
- }
- },
- "scale1.5": {
- "idle": {
- "cpu_percent": 0.005,
- "instructions_per_s": 4718,
- "cycles_per_s": 10739,
- "ghz_user": 0.219,
- "rss_anon_kb": 46988,
- "voluntary_switches_per_s": 0.6
- },
- "spinner_clear": {
- "cpu_percent": 6.944,
- "instructions_per_s": 39696976,
- "cycles_per_s": 53753213,
- "ghz_user": 0.774,
- "rss_anon_kb": 47604,
- "voluntary_switches_per_s": 191.0
- },
- "spinner_glass": {
- "cpu_percent": 10.26,
- "instructions_per_s": 69796779,
- "cycles_per_s": 62527444,
- "ghz_user": 0.609,
- "rss_anon_kb": 47604,
- "voluntary_switches_per_s": 185.0
- },
- "damage_full": {
- "cpu_percent": 16.412,
- "instructions_per_s": 93711725,
- "cycles_per_s": 141373624,
- "ghz_user": 0.861,
- "rss_anon_kb": 47604,
- "voluntary_switches_per_s": 673.0
- },
- "drag": {
- "cpu_percent": 7.235,
- "instructions_per_s": 76058075,
- "cycles_per_s": 66678135,
- "ghz_user": 0.922,
- "rss_anon_kb": 47772,
- "voluntary_switches_per_s": 162.5
- },
- "resize": {
- "cpu_percent": 26.158,
- "instructions_per_s": 482152649,
- "cycles_per_s": 280130127,
- "ghz_user": 1.071,
- "rss_anon_kb": 47920,
- "voluntary_switches_per_s": 334.7
- },
- "fullscreen": {
- "cpu_percent": 33.99,
- "instructions_per_s": 63667665,
- "cycles_per_s": 395386885,
- "ghz_user": 1.163,
- "rss_anon_kb": 55968,
- "voluntary_switches_per_s": 150.0
- },
- "zoom_85": {
- "cpu_percent": 6.579,
- "instructions_per_s": 69571066,
- "cycles_per_s": 65839096,
- "ghz_user": 1.001,
- "rss_anon_kb": 55968,
- "voluntary_switches_per_s": 189.2
- },
- "zoom_70": {
- "cpu_percent": 6.061,
- "instructions_per_s": 71429201,
- "cycles_per_s": 65971166,
- "ghz_user": 1.088,
- "rss_anon_kb": 56396,
- "voluntary_switches_per_s": 189.5
- },
- "zoom_55": {
- "cpu_percent": 6.691,
- "instructions_per_s": 69677189,
- "cycles_per_s": 64401686,
- "ghz_user": 0.962,
- "rss_anon_kb": 56396,
- "voluntary_switches_per_s": 189.5
- },
- "zoom_min_hold": {
- "cpu_percent": 5.632,
- "instructions_per_s": 41055511,
- "cycles_per_s": 48416331,
- "ghz_user": 0.86,
- "rss_anon_kb": 56564,
- "voluntary_switches_per_s": 191.2
- }
- },
- "mixed": {
- "idle": {
- "cpu_percent": 0.007,
- "instructions_per_s": 2153,
- "cycles_per_s": 6980,
- "ghz_user": 0.101,
- "rss_anon_kb": 46532,
- "voluntary_switches_per_s": 0.6
- },
- "spinner_clear": {
- "cpu_percent": 8.435,
- "instructions_per_s": 48124499,
- "cycles_per_s": 61935110,
- "ghz_user": 0.734,
- "rss_anon_kb": 51124,
- "voluntary_switches_per_s": 244.2
- },
- "spinner_glass": {
- "cpu_percent": 12.931,
- "instructions_per_s": 86793066,
- "cycles_per_s": 84672843,
- "ghz_user": 0.655,
- "rss_anon_kb": 51124,
- "voluntary_switches_per_s": 185.5
- },
- "damage_full": {
- "cpu_percent": 24.465,
- "instructions_per_s": 106758676,
- "cycles_per_s": 145785428,
- "ghz_user": 0.596,
- "rss_anon_kb": 51124,
- "voluntary_switches_per_s": 657.2
- },
- "drag": {
- "cpu_percent": 6.977,
- "instructions_per_s": 80286962,
- "cycles_per_s": 87853162,
- "ghz_user": 1.259,
- "rss_anon_kb": 51128,
- "voluntary_switches_per_s": 182.8
- },
- "resize": {
- "cpu_percent": 25.809,
- "instructions_per_s": 543074690,
- "cycles_per_s": 315306129,
- "ghz_user": 1.222,
- "rss_anon_kb": 51128,
- "voluntary_switches_per_s": 335.0
- },
- "fullscreen": {
- "cpu_percent": 44.519,
- "instructions_per_s": 86095722,
- "cycles_per_s": 348965485,
- "ghz_user": 0.784,
- "rss_anon_kb": 55900,
- "voluntary_switches_per_s": 108.5
- },
- "zoom_85": {
- "cpu_percent": 9.943,
- "instructions_per_s": 88689760,
- "cycles_per_s": 82081555,
- "ghz_user": 0.826,
- "rss_anon_kb": 55900,
- "voluntary_switches_per_s": 192.5
- },
- "zoom_70": {
- "cpu_percent": 7.93,
- "instructions_per_s": 76402555,
- "cycles_per_s": 72783436,
- "ghz_user": 0.918,
- "rss_anon_kb": 56320,
- "voluntary_switches_per_s": 243.5
- },
- "zoom_55": {
- "cpu_percent": 7.3,
- "instructions_per_s": 76980351,
- "cycles_per_s": 71386003,
- "ghz_user": 0.978,
- "rss_anon_kb": 56320,
- "voluntary_switches_per_s": 243.0
- },
- "zoom_min_hold": {
- "cpu_percent": 5.975,
- "instructions_per_s": 45115461,
- "cycles_per_s": 50303640,
- "ghz_user": 0.842,
- "rss_anon_kb": 56320,
- "voluntary_switches_per_s": 249.5
- }
- },
- "mixed_noglass": {
- "idle": {
- "cpu_percent": 0.006,
- "instructions_per_s": 4723,
- "cycles_per_s": 10165,
- "ghz_user": 0.163,
- "rss_anon_kb": 45236,
- "voluntary_switches_per_s": 0.8
- },
- "spinner_clear": {
- "cpu_percent": 6.525,
- "instructions_per_s": 36877944,
- "cycles_per_s": 47450765,
- "ghz_user": 0.727,
- "rss_anon_kb": 49840,
- "voluntary_switches_per_s": 245.2
- },
- "spinner_glass": {
- "cpu_percent": 6.36,
- "instructions_per_s": 38825863,
- "cycles_per_s": 46585029,
- "ghz_user": 0.732,
- "rss_anon_kb": 49840,
- "voluntary_switches_per_s": 246.7
- },
- "damage_full": {
- "cpu_percent": 11.173,
- "instructions_per_s": 63196760,
- "cycles_per_s": 100855156,
- "ghz_user": 0.903,
- "rss_anon_kb": 49840,
- "voluntary_switches_per_s": 742.5
- },
- "drag": {
- "cpu_percent": 3.54,
- "instructions_per_s": 59616628,
- "cycles_per_s": 47901858,
- "ghz_user": 1.353,
- "rss_anon_kb": 49844,
- "voluntary_switches_per_s": 206.8
- },
- "resize": {
- "cpu_percent": 18.539,
- "instructions_per_s": 459487895,
- "cycles_per_s": 233615930,
- "ghz_user": 1.26,
- "rss_anon_kb": 49844,
- "voluntary_switches_per_s": 359.7
- },
- "fullscreen": {
- "cpu_percent": 33.785,
- "instructions_per_s": 59723050,
- "cycles_per_s": 350597938,
- "ghz_user": 1.038,
- "rss_anon_kb": 54560,
- "voluntary_switches_per_s": 136.0
- },
- "zoom_85": {
- "cpu_percent": 6.295,
- "instructions_per_s": 39655292,
- "cycles_per_s": 52854070,
- "ghz_user": 0.84,
- "rss_anon_kb": 54560,
- "voluntary_switches_per_s": 248.5
- },
- "zoom_70": {
- "cpu_percent": 6.38,
- "instructions_per_s": 42160322,
- "cycles_per_s": 49035550,
- "ghz_user": 0.769,
- "rss_anon_kb": 55112,
- "voluntary_switches_per_s": 251.5
- },
- "zoom_55": {
- "cpu_percent": 6.843,
- "instructions_per_s": 42027062,
- "cycles_per_s": 54206581,
- "ghz_user": 0.792,
- "rss_anon_kb": 55112,
- "voluntary_switches_per_s": 247.7
- },
- "zoom_min_hold": {
- "cpu_percent": 7.23,
- "instructions_per_s": 39916181,
- "cycles_per_s": 71694844,
- "ghz_user": 0.992,
- "rss_anon_kb": 55112,
- "voluntary_switches_per_s": 245.2
- }
- }
- },
- "stats": {
- "scale1": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "projection_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.4781486611570248,
- "projection_cpu_avg_ms": 0.03744454545454545,
- "scene_commit_cpu_avg_ms": 0.2032478388429752,
- "gpu_elapsed_avg_ms": 0.227988347107438
- },
- "spinner_glass": {
- "output_commits": 237,
- "cpu_frame_avg_ms": 0.8745319282700422,
- "projection_cpu_avg_ms": 0.03763763713080169,
- "scene_commit_cpu_avg_ms": 0.23330458227848103,
- "gpu_elapsed_avg_ms": 0.667980864978903
- },
- "damage_full": {
- "output_commits": 235,
- "cpu_frame_avg_ms": 1.0531996595744681,
- "projection_cpu_avg_ms": 0.04486364255319149,
- "scene_commit_cpu_avg_ms": 0.31248761276595743,
- "gpu_elapsed_avg_ms": 0.8237014680851064
- },
- "drag": {
- "output_commits": 230,
- "cpu_frame_avg_ms": 1.5098620865800865,
- "projection_cpu_avg_ms": 0.14716427272727273,
- "scene_commit_cpu_avg_ms": 0.482337948051948,
- "gpu_elapsed_avg_ms": 1.2270691168831167
- },
- "resize": {
- "output_commits": 207,
- "cpu_frame_avg_ms": 3.045212816425121,
- "projection_cpu_avg_ms": 0.6549739806763285,
- "scene_commit_cpu_avg_ms": 0.6419680676328503,
- "gpu_elapsed_avg_ms": 2.311762579710145
- },
- "fullscreen": {
- "output_commits": 216,
- "cpu_frame_avg_ms": 0.5176387909090909,
- "projection_cpu_avg_ms": 0.0314781,
- "scene_commit_cpu_avg_ms": 0.3360912909090909,
- "gpu_elapsed_avg_ms": 0.7062175045454545
- },
- "zoom_85": {
- "output_commits": 235,
- "cpu_frame_avg_ms": 1.017434365957447,
- "projection_cpu_avg_ms": 0.046150936170212764,
- "scene_commit_cpu_avg_ms": 0.25208797021276597,
- "gpu_elapsed_avg_ms": 0.712672
- },
- "zoom_70": {
- "output_commits": 235,
- "cpu_frame_avg_ms": 1.0175623617021277,
- "projection_cpu_avg_ms": 0.045361378723404254,
- "scene_commit_cpu_avg_ms": 0.2687318340425532,
- "gpu_elapsed_avg_ms": 0.7598051914893617
- },
- "zoom_55": {
- "output_commits": 238,
- "cpu_frame_avg_ms": 0.8070821848739497,
- "projection_cpu_avg_ms": 0.034942936974789916,
- "scene_commit_cpu_avg_ms": 0.20067274369747898,
- "gpu_elapsed_avg_ms": 0.5764493739495797
- },
- "zoom_min_hold": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.5887947261410789,
- "projection_cpu_avg_ms": 0.042856912863070536,
- "scene_commit_cpu_avg_ms": 0.2649705020746888,
- "gpu_elapsed_avg_ms": 0.2998997095435685
- }
- },
- "scale1.5": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "projection_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 244,
- "cpu_frame_avg_ms": 0.3936904672131148,
- "projection_cpu_avg_ms": 0.031915049180327865,
- "scene_commit_cpu_avg_ms": 0.17252919672131148,
- "gpu_elapsed_avg_ms": 0.1846196475409836
- },
- "spinner_glass": {
- "output_commits": 240,
- "cpu_frame_avg_ms": 0.6607080125,
- "projection_cpu_avg_ms": 0.030167983333333332,
- "scene_commit_cpu_avg_ms": 0.1790263,
- "gpu_elapsed_avg_ms": 0.7748500500000001
- },
- "damage_full": {
- "output_commits": 240,
- "cpu_frame_avg_ms": 0.6779031208333334,
- "projection_cpu_avg_ms": 0.028956408333333333,
- "scene_commit_cpu_avg_ms": 0.22200342916666665,
- "gpu_elapsed_avg_ms": 0.6779301757322176
- },
- "drag": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.7262553719008265,
- "projection_cpu_avg_ms": 0.06912417768595042,
- "scene_commit_cpu_avg_ms": 0.2253056611570248,
- "gpu_elapsed_avg_ms": 0.7077916280991735
- },
- "resize": {
- "output_commits": 227,
- "cpu_frame_avg_ms": 1.5222249823788547,
- "projection_cpu_avg_ms": 0.30797019823788546,
- "scene_commit_cpu_avg_ms": 0.32892623788546255,
- "gpu_elapsed_avg_ms": 1.34834895154185
- },
- "fullscreen": {
- "output_commits": 228,
- "cpu_frame_avg_ms": 0.44284630869565217,
- "projection_cpu_avg_ms": 0.028049821739130436,
- "scene_commit_cpu_avg_ms": 0.2902753782608696,
- "gpu_elapsed_avg_ms": 0.9333761347826087
- },
- "zoom_85": {
- "output_commits": 238,
- "cpu_frame_avg_ms": 0.7761139957983193,
- "projection_cpu_avg_ms": 0.03395472689075631,
- "scene_commit_cpu_avg_ms": 0.21123677731092438,
- "gpu_elapsed_avg_ms": 0.592603743697479
- },
- "zoom_70": {
- "output_commits": 237,
- "cpu_frame_avg_ms": 0.8716835780590717,
- "projection_cpu_avg_ms": 0.036782987341772155,
- "scene_commit_cpu_avg_ms": 0.23839708016877637,
- "gpu_elapsed_avg_ms": 0.6447910084388186
- },
- "zoom_55": {
- "output_commits": 238,
- "cpu_frame_avg_ms": 0.7791564327731093,
- "projection_cpu_avg_ms": 0.032899226890756306,
- "scene_commit_cpu_avg_ms": 0.20724815966386553,
- "gpu_elapsed_avg_ms": 0.5625833907563025
- },
- "zoom_min_hold": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.5344439834710744,
- "projection_cpu_avg_ms": 0.03789394628099174,
- "scene_commit_cpu_avg_ms": 0.25050344628099175,
- "gpu_elapsed_avg_ms": 0.2675604049586777
- }
- },
- "mixed": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "projection_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 245,
- "cpu_frame_avg_ms": 0.25022030721649485,
- "projection_cpu_avg_ms": 0.021667861855670104,
- "scene_commit_cpu_avg_ms": 0.07999409690721648,
- "gpu_elapsed_avg_ms": 0.09944105567010308
- },
- "spinner_glass": {
- "output_commits": 480,
- "cpu_frame_avg_ms": 0.43400856666666665,
- "projection_cpu_avg_ms": 0.022216925,
- "scene_commit_cpu_avg_ms": 0.12435968333333333,
- "gpu_elapsed_avg_ms": 0.3123255
- },
- "damage_full": {
- "output_commits": 482,
- "cpu_frame_avg_ms": 0.38750321784232367,
- "projection_cpu_avg_ms": 0.018342784232365145,
- "scene_commit_cpu_avg_ms": 0.12208571161825726,
- "gpu_elapsed_avg_ms": 0.30523731950207467
- },
- "drag": {
- "output_commits": 472,
- "cpu_frame_avg_ms": 0.669840582278481,
- "projection_cpu_avg_ms": 0.08396799789029535,
- "scene_commit_cpu_avg_ms": 0.18794868776371307,
- "gpu_elapsed_avg_ms": 0.4663474451476793
- },
- "resize": {
- "output_commits": 440,
- "cpu_frame_avg_ms": 1.3679062318181818,
- "projection_cpu_avg_ms": 0.22638816363636363,
- "scene_commit_cpu_avg_ms": 0.2513304090909091,
- "gpu_elapsed_avg_ms": 1.1250414454545457
- },
- "fullscreen": {
- "output_commits": 283,
- "cpu_frame_avg_ms": 0.39710350434782604,
- "projection_cpu_avg_ms": 0.025485397826086956,
- "scene_commit_cpu_avg_ms": 0.12963719130434784,
- "gpu_elapsed_avg_ms": 0.3731455304347826
- },
- "zoom_85": {
- "output_commits": 478,
- "cpu_frame_avg_ms": 0.4724712761506276,
- "projection_cpu_avg_ms": 0.023613675732217572,
- "scene_commit_cpu_avg_ms": 0.13305476778242678,
- "gpu_elapsed_avg_ms": 0.3526927782426778
- },
- "zoom_70": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.47742241701244814,
- "projection_cpu_avg_ms": 0.025680929460580912,
- "scene_commit_cpu_avg_ms": 0.11396389626556017,
- "gpu_elapsed_avg_ms": 0.3260153049792531
- },
- "zoom_55": {
- "output_commits": 240,
- "cpu_frame_avg_ms": 0.5102375333333333,
- "projection_cpu_avg_ms": 0.027895397916666665,
- "scene_commit_cpu_avg_ms": 0.11621068958333335,
- "gpu_elapsed_avg_ms": 0.35329426458333335
- },
- "zoom_min_hold": {
- "output_commits": 252,
- "cpu_frame_avg_ms": 0.3180265360824742,
- "projection_cpu_avg_ms": 0.02708674226804124,
- "scene_commit_cpu_avg_ms": 0.11067828041237114,
- "gpu_elapsed_avg_ms": 0.1220789381443299
- }
- },
- "mixed_noglass": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "projection_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 246,
- "cpu_frame_avg_ms": 0.1770848600823045,
- "projection_cpu_avg_ms": 0.015449199588477366,
- "scene_commit_cpu_avg_ms": 0.0622310987654321,
- "gpu_elapsed_avg_ms": 0.052535574074074075
- },
- "spinner_glass": {
- "output_commits": 243,
- "cpu_frame_avg_ms": 0.31317531818181815,
- "projection_cpu_avg_ms": 0.027160136363636365,
- "scene_commit_cpu_avg_ms": 0.11567032644628099,
- "gpu_elapsed_avg_ms": 0.12314383884297521
- },
- "damage_full": {
- "output_commits": 243,
- "cpu_frame_avg_ms": 0.3470042277432712,
- "projection_cpu_avg_ms": 0.027589132505175987,
- "scene_commit_cpu_avg_ms": 0.14905013457556937,
- "gpu_elapsed_avg_ms": 0.1795864927536232
- },
- "drag": {
- "output_commits": 484,
- "cpu_frame_avg_ms": 0.45386004526748974,
- "projection_cpu_avg_ms": 0.07313680452674896,
- "scene_commit_cpu_avg_ms": 0.20871510905349794,
- "gpu_elapsed_avg_ms": 0.27409777366255145
- },
- "resize": {
- "output_commits": 466,
- "cpu_frame_avg_ms": 0.6899709957081546,
- "projection_cpu_avg_ms": 0.24340635193133048,
- "scene_commit_cpu_avg_ms": 0.3117513712446352,
- "gpu_elapsed_avg_ms": 0.3687583741935484
- },
- "fullscreen": {
- "output_commits": 455,
- "cpu_frame_avg_ms": 0.2672172778993435,
- "projection_cpu_avg_ms": 0.01984746389496718,
- "scene_commit_cpu_avg_ms": 0.15941523194748358,
- "gpu_elapsed_avg_ms": 0.26373856673960616
- },
- "zoom_85": {
- "output_commits": 257,
- "cpu_frame_avg_ms": 0.2925634772727273,
- "projection_cpu_avg_ms": 0.024441260330578512,
- "scene_commit_cpu_avg_ms": 0.11103879958677686,
- "gpu_elapsed_avg_ms": 0.11958569834710743
- },
- "zoom_70": {
- "output_commits": 245,
- "cpu_frame_avg_ms": 0.2675221074380165,
- "projection_cpu_avg_ms": 0.023059834710743802,
- "scene_commit_cpu_avg_ms": 0.10346771074380165,
- "gpu_elapsed_avg_ms": 0.10541182438016529
- },
- "zoom_55": {
- "output_commits": 243,
- "cpu_frame_avg_ms": 0.30068719047619047,
- "projection_cpu_avg_ms": 0.026371070393374742,
- "scene_commit_cpu_avg_ms": 0.1134972712215321,
- "gpu_elapsed_avg_ms": 0.12421444720496895
- },
- "zoom_min_hold": {
- "output_commits": 252,
- "cpu_frame_avg_ms": 0.26464967148760327,
- "projection_cpu_avg_ms": 0.02108496694214876,
- "scene_commit_cpu_avg_ms": 0.09694334504132232,
- "gpu_elapsed_avg_ms": 0.10003001652892562
- }
- }
- }
- }
- }
-}
diff --git a/docs/plans/scene-graph-stage5-cost.json b/docs/plans/scene-graph-stage5-cost.json
deleted file mode 100644
index 2747b58..0000000
--- a/docs/plans/scene-graph-stage5-cost.json
+++ /dev/null
@@ -1,3713 +0,0 @@
-{
- "what": "stage 5 cost gate: stage 0 (f6e7b24), stage 4 (7e7d981), stage 5 (760f774); ReleaseSafe, scene_baseline clean and stats sessions, interleaved s0, s4, 5e, 5e, s4, s0, AC power, performance profile",
- "runs": {
- "s0-a": {
- "meta": {
- "kernel": "7.2.9-zen1-1-zen",
- "pinned_cpus": [
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9
- ],
- "render_device": "/dev/dri/renderD128",
- "seconds": 4.0,
- "power": {
- "ac_online": true,
- "battery": "Not charging",
- "platform_profile": "performance",
- "governor": "schedutil",
- "epp": "performance",
- "no_turbo": "0"
- },
- "date": "2026-10-11 16:23:13"
- },
- "clean": {
- "scale1": {
- "idle": {
- "cpu_percent": 0.005,
- "instructions_per_s": 2151,
- "cycles_per_s": 7940,
- "rss_anon_kb": 42904
- },
- "spinner_clear": {
- "cpu_percent": 8.357,
- "instructions_per_s": 37179279,
- "cycles_per_s": 48096011,
- "rss_anon_kb": 43500
- },
- "spinner_glass": {
- "cpu_percent": 9.607,
- "instructions_per_s": 67143733,
- "cycles_per_s": 72203627,
- "rss_anon_kb": 43500
- },
- "damage_full": {
- "cpu_percent": 15.976,
- "instructions_per_s": 87535213,
- "cycles_per_s": 144614933,
- "rss_anon_kb": 43500
- },
- "drag": {
- "cpu_percent": 5.906,
- "instructions_per_s": 73611403,
- "cycles_per_s": 73117561,
- "rss_anon_kb": 43500
- },
- "resize": {
- "cpu_percent": 21.768,
- "instructions_per_s": 306746772,
- "cycles_per_s": 211581957,
- "rss_anon_kb": 43664
- },
- "fullscreen": {
- "cpu_percent": 35.571,
- "instructions_per_s": 59575962,
- "cycles_per_s": 362512359,
- "rss_anon_kb": 47440
- },
- "zoom_85": {
- "cpu_percent": 8.929,
- "instructions_per_s": 65073844,
- "cycles_per_s": 78930230,
- "rss_anon_kb": 47440
- },
- "zoom_70": {
- "cpu_percent": 9.133,
- "instructions_per_s": 67299998,
- "cycles_per_s": 77458770,
- "rss_anon_kb": 47680
- },
- "zoom_55": {
- "cpu_percent": 9.11,
- "instructions_per_s": 65051556,
- "cycles_per_s": 72895092,
- "rss_anon_kb": 47680
- },
- "zoom_min_hold": {
- "cpu_percent": 7.21,
- "instructions_per_s": 38641499,
- "cycles_per_s": 55819309,
- "rss_anon_kb": 48004
- }
- },
- "scale1.5": {
- "idle": {
- "cpu_percent": 0.005,
- "instructions_per_s": 2148,
- "cycles_per_s": 7990,
- "rss_anon_kb": 46960
- },
- "spinner_clear": {
- "cpu_percent": 8.873,
- "instructions_per_s": 39215532,
- "cycles_per_s": 48947052,
- "rss_anon_kb": 47564
- },
- "spinner_glass": {
- "cpu_percent": 11.689,
- "instructions_per_s": 68921995,
- "cycles_per_s": 64690230,
- "rss_anon_kb": 47652
- },
- "damage_full": {
- "cpu_percent": 20.57,
- "instructions_per_s": 92558216,
- "cycles_per_s": 132316124,
- "rss_anon_kb": 47656
- },
- "drag": {
- "cpu_percent": 8.487,
- "instructions_per_s": 75148003,
- "cycles_per_s": 60098310,
- "rss_anon_kb": 47888
- },
- "resize": {
- "cpu_percent": 24.064,
- "instructions_per_s": 483933372,
- "cycles_per_s": 277274978,
- "rss_anon_kb": 47920
- },
- "fullscreen": {
- "cpu_percent": 35.899,
- "instructions_per_s": 63632411,
- "cycles_per_s": 411668048,
- "rss_anon_kb": 56296
- },
- "zoom_85": {
- "cpu_percent": 9.221,
- "instructions_per_s": 68680735,
- "cycles_per_s": 89525023,
- "rss_anon_kb": 56296
- },
- "zoom_70": {
- "cpu_percent": 9.129,
- "instructions_per_s": 70049490,
- "cycles_per_s": 92896882,
- "rss_anon_kb": 56328
- },
- "zoom_55": {
- "cpu_percent": 9.255,
- "instructions_per_s": 68869747,
- "cycles_per_s": 91600747,
- "rss_anon_kb": 56328
- },
- "zoom_min_hold": {
- "cpu_percent": 7.465,
- "instructions_per_s": 40679362,
- "cycles_per_s": 66029302,
- "rss_anon_kb": 56496
- }
- },
- "mixed": {
- "idle": {
- "cpu_percent": 0.008,
- "instructions_per_s": 4726,
- "cycles_per_s": 10657,
- "rss_anon_kb": 46536
- },
- "spinner_clear": {
- "cpu_percent": 7.83,
- "instructions_per_s": 47758737,
- "cycles_per_s": 60310488,
- "rss_anon_kb": 51124
- },
- "spinner_glass": {
- "cpu_percent": 10.686,
- "instructions_per_s": 87193520,
- "cycles_per_s": 92464450,
- "rss_anon_kb": 51124
- },
- "damage_full": {
- "cpu_percent": 17.211,
- "instructions_per_s": 108055404,
- "cycles_per_s": 158014703,
- "rss_anon_kb": 51124
- },
- "drag": {
- "cpu_percent": 7.009,
- "instructions_per_s": 79588033,
- "cycles_per_s": 82371012,
- "rss_anon_kb": 51128
- },
- "resize": {
- "cpu_percent": 29.907,
- "instructions_per_s": 538517500,
- "cycles_per_s": 350815256,
- "rss_anon_kb": 51128
- },
- "fullscreen": {
- "cpu_percent": 30.477,
- "instructions_per_s": 81222735,
- "cycles_per_s": 439484467,
- "rss_anon_kb": 55980
- },
- "zoom_85": {
- "cpu_percent": 11.075,
- "instructions_per_s": 86974242,
- "cycles_per_s": 92068806,
- "rss_anon_kb": 55980
- },
- "zoom_70": {
- "cpu_percent": 10.885,
- "instructions_per_s": 76568925,
- "cycles_per_s": 82178160,
- "rss_anon_kb": 56560
- },
- "zoom_55": {
- "cpu_percent": 12.202,
- "instructions_per_s": 76398970,
- "cycles_per_s": 75261435,
- "rss_anon_kb": 56560
- },
- "zoom_min_hold": {
- "cpu_percent": 8.899,
- "instructions_per_s": 44326770,
- "cycles_per_s": 53491277,
- "rss_anon_kb": 56560
- }
- },
- "mixed_noglass": {
- "idle": {
- "cpu_percent": 0.005,
- "instructions_per_s": 2156,
- "cycles_per_s": 7377,
- "rss_anon_kb": 45916
- },
- "spinner_clear": {
- "cpu_percent": 8.323,
- "instructions_per_s": 36567165,
- "cycles_per_s": 50615621,
- "rss_anon_kb": 50520
- },
- "spinner_glass": {
- "cpu_percent": 9.28,
- "instructions_per_s": 38350392,
- "cycles_per_s": 53636267,
- "rss_anon_kb": 50520
- },
- "damage_full": {
- "cpu_percent": 18.489,
- "instructions_per_s": 62244130,
- "cycles_per_s": 114697793,
- "rss_anon_kb": 50520
- },
- "drag": {
- "cpu_percent": 6.188,
- "instructions_per_s": 58656714,
- "cycles_per_s": 51628306,
- "rss_anon_kb": 50524
- },
- "resize": {
- "cpu_percent": 24.187,
- "instructions_per_s": 457697466,
- "cycles_per_s": 233376427,
- "rss_anon_kb": 50524
- },
- "fullscreen": {
- "cpu_percent": 36.073,
- "instructions_per_s": 59431299,
- "cycles_per_s": 312346032,
- "rss_anon_kb": 55080
- },
- "zoom_85": {
- "cpu_percent": 9.119,
- "instructions_per_s": 39619314,
- "cycles_per_s": 53504758,
- "rss_anon_kb": 55080
- },
- "zoom_70": {
- "cpu_percent": 7.982,
- "instructions_per_s": 41273391,
- "cycles_per_s": 53617010,
- "rss_anon_kb": 55816
- },
- "zoom_55": {
- "cpu_percent": 8.739,
- "instructions_per_s": 41474559,
- "cycles_per_s": 53326539,
- "rss_anon_kb": 55816
- },
- "zoom_min_hold": {
- "cpu_percent": 9.199,
- "instructions_per_s": 39512035,
- "cycles_per_s": 54129715,
- "rss_anon_kb": 55816
- }
- }
- },
- "stats": {
- "scale1": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 243,
- "cpu_frame_avg_ms": 0.3941868559670782,
- "glass_cpu_avg_ms": 0.02303369547325103,
- "scene_commit_cpu_avg_ms": 0.18201408230452676,
- "gpu_elapsed_avg_ms": 0.1737371399176955
- },
- "spinner_glass": {
- "output_commits": 238,
- "cpu_frame_avg_ms": 0.71377156302521,
- "glass_cpu_avg_ms": 0.3327441008403361,
- "scene_commit_cpu_avg_ms": 0.18882228151260505,
- "gpu_elapsed_avg_ms": 0.5105722647058824
- },
- "damage_full": {
- "output_commits": 239,
- "cpu_frame_avg_ms": 0.7212443430962343,
- "glass_cpu_avg_ms": 0.32792430543933054,
- "scene_commit_cpu_avg_ms": 0.20739947280334728,
- "gpu_elapsed_avg_ms": 0.5625984957983193
- },
- "drag": {
- "output_commits": 239,
- "cpu_frame_avg_ms": 0.8145147666666667,
- "glass_cpu_avg_ms": 0.3295332125,
- "scene_commit_cpu_avg_ms": 0.2452904625,
- "gpu_elapsed_avg_ms": 0.6714633249999999
- },
- "resize": {
- "output_commits": 222,
- "cpu_frame_avg_ms": 1.9081120765765767,
- "glass_cpu_avg_ms": 0.9347127432432432,
- "scene_commit_cpu_avg_ms": 0.3832112747747748,
- "gpu_elapsed_avg_ms": 1.4690601351351351
- },
- "fullscreen": {
- "output_commits": 145,
- "cpu_frame_avg_ms": 0.41206987763713077,
- "glass_cpu_avg_ms": 0.008972067510548522,
- "scene_commit_cpu_avg_ms": 0.219642805907173,
- "gpu_elapsed_avg_ms": 0.4341405147679325
- },
- "zoom_85": {
- "output_commits": 235,
- "cpu_frame_avg_ms": 0.9687079574468085,
- "glass_cpu_avg_ms": 0.4326363744680851,
- "scene_commit_cpu_avg_ms": 0.23110854468085107,
- "gpu_elapsed_avg_ms": 0.6693572893617021
- },
- "zoom_70": {
- "output_commits": 235,
- "cpu_frame_avg_ms": 0.9613879021276596,
- "glass_cpu_avg_ms": 0.4241270893617021,
- "scene_commit_cpu_avg_ms": 0.24313691914893618,
- "gpu_elapsed_avg_ms": 0.6761495914893617
- },
- "zoom_55": {
- "output_commits": 235,
- "cpu_frame_avg_ms": 0.999847144680851,
- "glass_cpu_avg_ms": 0.44881457021276594,
- "scene_commit_cpu_avg_ms": 0.23549191063829789,
- "gpu_elapsed_avg_ms": 0.6919173106382979
- },
- "zoom_min_hold": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.6072230041493776,
- "glass_cpu_avg_ms": 0.012535049792531122,
- "scene_commit_cpu_avg_ms": 0.2672312489626556,
- "gpu_elapsed_avg_ms": 0.2836648547717842
- }
- },
- "scale1.5": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 243,
- "cpu_frame_avg_ms": 0.42204588065843623,
- "glass_cpu_avg_ms": 0.02381822633744856,
- "scene_commit_cpu_avg_ms": 0.19179409053497942,
- "gpu_elapsed_avg_ms": 0.18827054732510287
- },
- "spinner_glass": {
- "output_commits": 239,
- "cpu_frame_avg_ms": 0.7319612259414227,
- "glass_cpu_avg_ms": 0.33905735983263596,
- "scene_commit_cpu_avg_ms": 0.1905863849372385,
- "gpu_elapsed_avg_ms": 0.5355125648535565
- },
- "damage_full": {
- "output_commits": 239,
- "cpu_frame_avg_ms": 0.7372882719665272,
- "glass_cpu_avg_ms": 0.3252366234309623,
- "scene_commit_cpu_avg_ms": 0.22841571129707114,
- "gpu_elapsed_avg_ms": 0.6358442857142856
- },
- "drag": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.7002787314049587,
- "glass_cpu_avg_ms": 0.2785102272727273,
- "scene_commit_cpu_avg_ms": 0.21379236776859506,
- "gpu_elapsed_avg_ms": 0.6730126487603306
- },
- "resize": {
- "output_commits": 225,
- "cpu_frame_avg_ms": 1.6563550355555554,
- "glass_cpu_avg_ms": 0.8432665333333333,
- "scene_commit_cpu_avg_ms": 0.3479774755555555,
- "gpu_elapsed_avg_ms": 1.4509879377777777
- },
- "fullscreen": {
- "output_commits": 226,
- "cpu_frame_avg_ms": 0.4515708495575221,
- "glass_cpu_avg_ms": 0.011085845132743364,
- "scene_commit_cpu_avg_ms": 0.30563815929203536,
- "gpu_elapsed_avg_ms": 0.9367030973451327
- },
- "zoom_85": {
- "output_commits": 240,
- "cpu_frame_avg_ms": 0.6022911791666667,
- "glass_cpu_avg_ms": 0.27707882083333335,
- "scene_commit_cpu_avg_ms": 0.16213616666666666,
- "gpu_elapsed_avg_ms": 0.4411998625
- },
- "zoom_70": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.588197336099585,
- "glass_cpu_avg_ms": 0.27126486307053943,
- "scene_commit_cpu_avg_ms": 0.16063878423236513,
- "gpu_elapsed_avg_ms": 0.42680039834024897
- },
- "zoom_55": {
- "output_commits": 240,
- "cpu_frame_avg_ms": 0.5904543208333333,
- "glass_cpu_avg_ms": 0.27641665416666666,
- "scene_commit_cpu_avg_ms": 0.1515412458333333,
- "gpu_elapsed_avg_ms": 0.4217767083333333
- },
- "zoom_min_hold": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.568400153526971,
- "glass_cpu_avg_ms": 0.011665273858921162,
- "scene_commit_cpu_avg_ms": 0.2573816265560166,
- "gpu_elapsed_avg_ms": 0.26917527800829877
- }
- },
- "mixed": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.3502667660455487,
- "glass_cpu_avg_ms": 0.03259112629399586,
- "scene_commit_cpu_avg_ms": 0.10613104554865425,
- "gpu_elapsed_avg_ms": 0.13251703726708075
- },
- "spinner_glass": {
- "output_commits": 473,
- "cpu_frame_avg_ms": 0.6147180021141648,
- "glass_cpu_avg_ms": 0.24020389852008456,
- "scene_commit_cpu_avg_ms": 0.17544831501057084,
- "gpu_elapsed_avg_ms": 0.4409403847780127
- },
- "damage_full": {
- "output_commits": 474,
- "cpu_frame_avg_ms": 0.6033062109704641,
- "glass_cpu_avg_ms": 0.23001420675105486,
- "scene_commit_cpu_avg_ms": 0.18626043248945148,
- "gpu_elapsed_avg_ms": 0.46883359408033826
- },
- "drag": {
- "output_commits": 472,
- "cpu_frame_avg_ms": 0.6962897383966244,
- "glass_cpu_avg_ms": 0.22898786075949365,
- "scene_commit_cpu_avg_ms": 0.19161702742616035,
- "gpu_elapsed_avg_ms": 0.47595584810126584
- },
- "resize": {
- "output_commits": 442,
- "cpu_frame_avg_ms": 1.382199902714932,
- "glass_cpu_avg_ms": 0.8005365045248869,
- "scene_commit_cpu_avg_ms": 0.2517356968325792,
- "gpu_elapsed_avg_ms": 1.119793423076923
- },
- "fullscreen": {
- "output_commits": 204,
- "cpu_frame_avg_ms": 0.27162057300884956,
- "glass_cpu_avg_ms": 0.07076303097345132,
- "scene_commit_cpu_avg_ms": 0.08798047787610619,
- "gpu_elapsed_avg_ms": 0.23643416371681417
- },
- "zoom_85": {
- "output_commits": 472,
- "cpu_frame_avg_ms": 0.5816571398305085,
- "glass_cpu_avg_ms": 0.23233801694915254,
- "scene_commit_cpu_avg_ms": 0.1608025911016949,
- "gpu_elapsed_avg_ms": 0.42035433474576267
- },
- "zoom_70": {
- "output_commits": 240,
- "cpu_frame_avg_ms": 0.5420456437500001,
- "glass_cpu_avg_ms": 0.18418222916666666,
- "scene_commit_cpu_avg_ms": 0.16559772708333334,
- "gpu_elapsed_avg_ms": 0.38462833541666663
- },
- "zoom_55": {
- "output_commits": 240,
- "cpu_frame_avg_ms": 0.51891840625,
- "glass_cpu_avg_ms": 0.21794241666666667,
- "scene_commit_cpu_avg_ms": 0.11916393958333334,
- "gpu_elapsed_avg_ms": 0.36410863125
- },
- "zoom_min_hold": {
- "output_commits": 251,
- "cpu_frame_avg_ms": 0.3735151784232365,
- "glass_cpu_avg_ms": 0.01513338796680498,
- "scene_commit_cpu_avg_ms": 0.12941838381742737,
- "gpu_elapsed_avg_ms": 0.14682651867219917
- }
- },
- "mixed_noglass": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.3432384120082816,
- "glass_cpu_avg_ms": 0.0007843561076604555,
- "scene_commit_cpu_avg_ms": 0.11768173913043478,
- "gpu_elapsed_avg_ms": 0.11855884265010351
- },
- "spinner_glass": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.35760094594594594,
- "glass_cpu_avg_ms": 0.0007950706860706861,
- "scene_commit_cpu_avg_ms": 0.1288245446985447,
- "gpu_elapsed_avg_ms": 0.13332467359667358
- },
- "damage_full": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.32530122981366455,
- "glass_cpu_avg_ms": 0.0006813913043478261,
- "scene_commit_cpu_avg_ms": 0.13958559213250518,
- "gpu_elapsed_avg_ms": 0.15943044927536232
- },
- "drag": {
- "output_commits": 484,
- "cpu_frame_avg_ms": 0.490501487654321,
- "glass_cpu_avg_ms": 0.0005761111111111111,
- "scene_commit_cpu_avg_ms": 0.2274592489711934,
- "gpu_elapsed_avg_ms": 0.2930764300411523
- },
- "resize": {
- "output_commits": 466,
- "cpu_frame_avg_ms": 0.6714312768240343,
- "glass_cpu_avg_ms": 0.0005101738197424893,
- "scene_commit_cpu_avg_ms": 0.30380922317596565,
- "gpu_elapsed_avg_ms": 0.36125259871244636
- },
- "fullscreen": {
- "output_commits": 468,
- "cpu_frame_avg_ms": 0.2343104745762712,
- "glass_cpu_avg_ms": 0.00036425211864406785,
- "scene_commit_cpu_avg_ms": 0.1420802288135593,
- "gpu_elapsed_avg_ms": 0.24863534745762714
- },
- "zoom_85": {
- "output_commits": 257,
- "cpu_frame_avg_ms": 0.28299982644628097,
- "glass_cpu_avg_ms": 0.0005581652892561983,
- "scene_commit_cpu_avg_ms": 0.11269544834710743,
- "gpu_elapsed_avg_ms": 0.10739861076604555
- },
- "zoom_70": {
- "output_commits": 245,
- "cpu_frame_avg_ms": 0.28636615495867773,
- "glass_cpu_avg_ms": 0.0006150433884297521,
- "scene_commit_cpu_avg_ms": 0.11628401446280992,
- "gpu_elapsed_avg_ms": 0.11154689049586777
- },
- "zoom_55": {
- "output_commits": 244,
- "cpu_frame_avg_ms": 0.2786745495867769,
- "glass_cpu_avg_ms": 0.0005598450413223141,
- "scene_commit_cpu_avg_ms": 0.11479238223140496,
- "gpu_elapsed_avg_ms": 0.11081414876033058
- },
- "zoom_min_hold": {
- "output_commits": 252,
- "cpu_frame_avg_ms": 0.2933492458677686,
- "glass_cpu_avg_ms": 0.0005152789256198347,
- "scene_commit_cpu_avg_ms": 0.11348070454545454,
- "gpu_elapsed_avg_ms": 0.1093103367768595
- }
- }
- }
- },
- "s4-a": {
- "meta": {
- "kernel": "7.2.9-zen1-1-zen",
- "pinned_cpus": [
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9
- ],
- "render_device": "/dev/dri/renderD128",
- "seconds": 4.0,
- "power": {
- "ac_online": true,
- "battery": "Not charging",
- "platform_profile": "performance",
- "governor": "schedutil",
- "epp": "performance",
- "no_turbo": "0"
- },
- "date": "2026-10-11 16:30:57"
- },
- "clean": {
- "scale1": {
- "idle": {
- "cpu_percent": 0.002,
- "instructions_per_s": 2717,
- "cycles_per_s": 6120,
- "rss_anon_kb": 45852
- },
- "spinner_clear": {
- "cpu_percent": 4.576,
- "instructions_per_s": 36023363,
- "cycles_per_s": 50051823,
- "rss_anon_kb": 46440
- },
- "spinner_glass": {
- "cpu_percent": 7.215,
- "instructions_per_s": 55856339,
- "cycles_per_s": 125242552,
- "rss_anon_kb": 46476
- },
- "damage_full": {
- "cpu_percent": 6.911,
- "instructions_per_s": 60854762,
- "cycles_per_s": 112793745,
- "rss_anon_kb": 46476
- },
- "drag": {
- "cpu_percent": 4.316,
- "instructions_per_s": 51105948,
- "cycles_per_s": 86046896,
- "rss_anon_kb": 46476
- },
- "resize": {
- "cpu_percent": 21.724,
- "instructions_per_s": 189050121,
- "cycles_per_s": 188698280,
- "rss_anon_kb": 46728
- },
- "fullscreen": {
- "cpu_percent": 17.325,
- "instructions_per_s": 14805754,
- "cycles_per_s": 120750618,
- "rss_anon_kb": 50564
- },
- "zoom_85": {
- "cpu_percent": 10.655,
- "instructions_per_s": 51897888,
- "cycles_per_s": 81148699,
- "rss_anon_kb": 50568
- },
- "zoom_70": {
- "cpu_percent": 9.955,
- "instructions_per_s": 53553512,
- "cycles_per_s": 82040223,
- "rss_anon_kb": 50616
- },
- "zoom_55": {
- "cpu_percent": 7.933,
- "instructions_per_s": 53164660,
- "cycles_per_s": 70926075,
- "rss_anon_kb": 50616
- },
- "zoom_min_hold": {
- "cpu_percent": 8.635,
- "instructions_per_s": 34451148,
- "cycles_per_s": 52340670,
- "rss_anon_kb": 50940
- }
- },
- "scale1.5": {
- "idle": {
- "cpu_percent": 0.002,
- "instructions_per_s": 143,
- "cycles_per_s": 2388,
- "rss_anon_kb": 48812
- },
- "spinner_clear": {
- "cpu_percent": 8.289,
- "instructions_per_s": 35478764,
- "cycles_per_s": 48044682,
- "rss_anon_kb": 49296
- },
- "spinner_glass": {
- "cpu_percent": 10.563,
- "instructions_per_s": 57687130,
- "cycles_per_s": 66215537,
- "rss_anon_kb": 49508
- },
- "damage_full": {
- "cpu_percent": 13.952,
- "instructions_per_s": 64425177,
- "cycles_per_s": 89987145,
- "rss_anon_kb": 49508
- },
- "drag": {
- "cpu_percent": 5.469,
- "instructions_per_s": 52907603,
- "cycles_per_s": 56648309,
- "rss_anon_kb": 49512
- },
- "resize": {
- "cpu_percent": 23.169,
- "instructions_per_s": 323899012,
- "cycles_per_s": 193783129,
- "rss_anon_kb": 50140
- },
- "fullscreen": {
- "cpu_percent": 44.24,
- "instructions_per_s": 45274411,
- "cycles_per_s": 308659725,
- "rss_anon_kb": 57664
- },
- "zoom_85": {
- "cpu_percent": 10.056,
- "instructions_per_s": 57259677,
- "cycles_per_s": 60673463,
- "rss_anon_kb": 57668
- },
- "zoom_70": {
- "cpu_percent": 10.536,
- "instructions_per_s": 58585933,
- "cycles_per_s": 63042413,
- "rss_anon_kb": 58176
- },
- "zoom_55": {
- "cpu_percent": 10.551,
- "instructions_per_s": 57430336,
- "cycles_per_s": 61261579,
- "rss_anon_kb": 58176
- },
- "zoom_min_hold": {
- "cpu_percent": 10.279,
- "instructions_per_s": 37462365,
- "cycles_per_s": 45099028,
- "rss_anon_kb": 58596
- }
- },
- "mixed": {
- "idle": {
- "cpu_percent": 0.004,
- "instructions_per_s": 2721,
- "cycles_per_s": 5942,
- "rss_anon_kb": 48124
- },
- "spinner_clear": {
- "cpu_percent": 9.145,
- "instructions_per_s": 44284742,
- "cycles_per_s": 56515551,
- "rss_anon_kb": 52716
- },
- "spinner_glass": {
- "cpu_percent": 13.258,
- "instructions_per_s": 73371581,
- "cycles_per_s": 74610678,
- "rss_anon_kb": 52716
- },
- "damage_full": {
- "cpu_percent": 14.4,
- "instructions_per_s": 78473760,
- "cycles_per_s": 101374699,
- "rss_anon_kb": 52716
- },
- "drag": {
- "cpu_percent": 8.728,
- "instructions_per_s": 58485047,
- "cycles_per_s": 60160952,
- "rss_anon_kb": 52716
- },
- "resize": {
- "cpu_percent": 29.169,
- "instructions_per_s": 370443513,
- "cycles_per_s": 226488237,
- "rss_anon_kb": 52716
- },
- "fullscreen": {
- "cpu_percent": 38.265,
- "instructions_per_s": 77653317,
- "cycles_per_s": 354608488,
- "rss_anon_kb": 56964
- },
- "zoom_85": {
- "cpu_percent": 12.297,
- "instructions_per_s": 74565271,
- "cycles_per_s": 74130029,
- "rss_anon_kb": 56968
- },
- "zoom_70": {
- "cpu_percent": 11.354,
- "instructions_per_s": 64665854,
- "cycles_per_s": 77996121,
- "rss_anon_kb": 57552
- },
- "zoom_55": {
- "cpu_percent": 11.482,
- "instructions_per_s": 64118565,
- "cycles_per_s": 70481243,
- "rss_anon_kb": 57552
- },
- "zoom_min_hold": {
- "cpu_percent": 9.523,
- "instructions_per_s": 43456816,
- "cycles_per_s": 56726106,
- "rss_anon_kb": 57552
- }
- },
- "mixed_noglass": {
- "idle": {
- "cpu_percent": 0.003,
- "instructions_per_s": 151,
- "cycles_per_s": 4141,
- "rss_anon_kb": 47356
- },
- "spinner_clear": {
- "cpu_percent": 8.505,
- "instructions_per_s": 35575617,
- "cycles_per_s": 51049783,
- "rss_anon_kb": 51960
- },
- "spinner_glass": {
- "cpu_percent": 8.6,
- "instructions_per_s": 37350163,
- "cycles_per_s": 53058696,
- "rss_anon_kb": 51960
- },
- "damage_full": {
- "cpu_percent": 11.984,
- "instructions_per_s": 40167136,
- "cycles_per_s": 74670954,
- "rss_anon_kb": 51960
- },
- "drag": {
- "cpu_percent": 6.583,
- "instructions_per_s": 40389273,
- "cycles_per_s": 44286379,
- "rss_anon_kb": 51960
- },
- "resize": {
- "cpu_percent": 20.599,
- "instructions_per_s": 303049356,
- "cycles_per_s": 173032688,
- "rss_anon_kb": 51960
- },
- "fullscreen": {
- "cpu_percent": 39.091,
- "instructions_per_s": 50847743,
- "cycles_per_s": 330080220,
- "rss_anon_kb": 56744
- },
- "zoom_85": {
- "cpu_percent": 9.27,
- "instructions_per_s": 38139069,
- "cycles_per_s": 52881709,
- "rss_anon_kb": 56748
- },
- "zoom_70": {
- "cpu_percent": 9.415,
- "instructions_per_s": 37994419,
- "cycles_per_s": 51568090,
- "rss_anon_kb": 57008
- },
- "zoom_55": {
- "cpu_percent": 9.5,
- "instructions_per_s": 38380170,
- "cycles_per_s": 53743399,
- "rss_anon_kb": 57008
- },
- "zoom_min_hold": {
- "cpu_percent": 9.18,
- "instructions_per_s": 39203700,
- "cycles_per_s": 53823262,
- "rss_anon_kb": 57008
- }
- }
- },
- "stats": {
- "scale1": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 224,
- "cpu_frame_avg_ms": 0.7911629163346613,
- "glass_cpu_avg_ms": 0.04641182470119522,
- "scene_commit_cpu_avg_ms": 0.39112762151394426,
- "gpu_elapsed_avg_ms": 0.47135455776892426
- },
- "spinner_glass": {
- "output_commits": 229,
- "cpu_frame_avg_ms": 0.940321685483871,
- "glass_cpu_avg_ms": 0.42701619758064513,
- "scene_commit_cpu_avg_ms": 0.27872162096774195,
- "gpu_elapsed_avg_ms": 0.7120398870967742
- },
- "damage_full": {
- "output_commits": 201,
- "cpu_frame_avg_ms": 1.5288500722891567,
- "glass_cpu_avg_ms": 0.6555707871485944,
- "scene_commit_cpu_avg_ms": 0.5072048795180722,
- "gpu_elapsed_avg_ms": 1.2918919598393575
- },
- "drag": {
- "output_commits": 218,
- "cpu_frame_avg_ms": 2.545448114155251,
- "glass_cpu_avg_ms": 0.9403169817351598,
- "scene_commit_cpu_avg_ms": 1.0591819497716894,
- "gpu_elapsed_avg_ms": 2.2074973470319637
- },
- "resize": {
- "output_commits": 205,
- "cpu_frame_avg_ms": 3.10646795631068,
- "glass_cpu_avg_ms": 1.8543861067961165,
- "scene_commit_cpu_avg_ms": 0.6338129854368932,
- "gpu_elapsed_avg_ms": 2.7073315631067962
- },
- "fullscreen": {
- "output_commits": 39,
- "cpu_frame_avg_ms": 0.4072323470319635,
- "glass_cpu_avg_ms": 0.006275899543378995,
- "scene_commit_cpu_avg_ms": 0.1045461415525114,
- "gpu_elapsed_avg_ms": 0.21166976712328767
- },
- "zoom_85": {
- "output_commits": 225,
- "cpu_frame_avg_ms": 1.302808849593496,
- "glass_cpu_avg_ms": 0.5683406869918699,
- "scene_commit_cpu_avg_ms": 0.3604864634146342,
- "gpu_elapsed_avg_ms": 0.9939119715447154
- },
- "zoom_70": {
- "output_commits": 237,
- "cpu_frame_avg_ms": 0.9255794050632912,
- "glass_cpu_avg_ms": 0.4033656202531646,
- "scene_commit_cpu_avg_ms": 0.2204084599156118,
- "gpu_elapsed_avg_ms": 0.6380469620253164
- },
- "zoom_55": {
- "output_commits": 236,
- "cpu_frame_avg_ms": 0.894428122881356,
- "glass_cpu_avg_ms": 0.39565682203389835,
- "scene_commit_cpu_avg_ms": 0.20568945762711865,
- "gpu_elapsed_avg_ms": 0.6056850677966101
- },
- "zoom_min_hold": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.6206384315352698,
- "glass_cpu_avg_ms": 0.012181639004149378,
- "scene_commit_cpu_avg_ms": 0.28338439004149374,
- "gpu_elapsed_avg_ms": 0.29568358091286306
- }
- },
- "scale1.5": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.6160289834024897,
- "glass_cpu_avg_ms": 0.0369121867219917,
- "scene_commit_cpu_avg_ms": 0.2762174066390041,
- "gpu_elapsed_avg_ms": 0.2874822738589211
- },
- "spinner_glass": {
- "output_commits": 236,
- "cpu_frame_avg_ms": 0.9069761440677967,
- "glass_cpu_avg_ms": 0.39522541949152545,
- "scene_commit_cpu_avg_ms": 0.24405755932203388,
- "gpu_elapsed_avg_ms": 0.7163230381355932
- },
- "damage_full": {
- "output_commits": 237,
- "cpu_frame_avg_ms": 0.8467742194092827,
- "glass_cpu_avg_ms": 0.35844997890295355,
- "scene_commit_cpu_avg_ms": 0.26577298312236286,
- "gpu_elapsed_avg_ms": 0.7370540675105485
- },
- "drag": {
- "output_commits": 236,
- "cpu_frame_avg_ms": 1.0724079662447257,
- "glass_cpu_avg_ms": 0.42175098312236287,
- "scene_commit_cpu_avg_ms": 0.30391788607594933,
- "gpu_elapsed_avg_ms": 0.9783265569620253
- },
- "resize": {
- "output_commits": 225,
- "cpu_frame_avg_ms": 1.7088454088888887,
- "glass_cpu_avg_ms": 0.975071911111111,
- "scene_commit_cpu_avg_ms": 0.3231998666666666,
- "gpu_elapsed_avg_ms": 1.6630138622222221
- },
- "fullscreen": {
- "output_commits": 225,
- "cpu_frame_avg_ms": 0.44750546222222226,
- "glass_cpu_avg_ms": 0.01487791111111111,
- "scene_commit_cpu_avg_ms": 0.28044794666666667,
- "gpu_elapsed_avg_ms": 1.0059731244444445
- },
- "zoom_85": {
- "output_commits": 235,
- "cpu_frame_avg_ms": 1.0082905659574468,
- "glass_cpu_avg_ms": 0.4344887531914894,
- "scene_commit_cpu_avg_ms": 0.26488715319148937,
- "gpu_elapsed_avg_ms": 0.7733360255319149
- },
- "zoom_70": {
- "output_commits": 239,
- "cpu_frame_avg_ms": 0.808282460251046,
- "glass_cpu_avg_ms": 0.3550556652719665,
- "scene_commit_cpu_avg_ms": 0.21986433054393306,
- "gpu_elapsed_avg_ms": 0.5927827268907563
- },
- "zoom_55": {
- "output_commits": 237,
- "cpu_frame_avg_ms": 0.8583491561181434,
- "glass_cpu_avg_ms": 0.3756405147679325,
- "scene_commit_cpu_avg_ms": 0.22147267088607595,
- "gpu_elapsed_avg_ms": 0.6152022025316456
- },
- "zoom_min_hold": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.5067996983471075,
- "glass_cpu_avg_ms": 0.011008661157024794,
- "scene_commit_cpu_avg_ms": 0.24234180165289254,
- "gpu_elapsed_avg_ms": 0.24399256198347108
- }
- },
- "mixed": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 240,
- "cpu_frame_avg_ms": 0.37323156458333334,
- "glass_cpu_avg_ms": 0.023777035416666665,
- "scene_commit_cpu_avg_ms": 0.12995387083333335,
- "gpu_elapsed_avg_ms": 0.16206801458333334
- },
- "spinner_glass": {
- "output_commits": 470,
- "cpu_frame_avg_ms": 0.6602495191489361,
- "glass_cpu_avg_ms": 0.24487485319148936,
- "scene_commit_cpu_avg_ms": 0.18888435957446809,
- "gpu_elapsed_avg_ms": 0.45995554468085104
- },
- "damage_full": {
- "output_commits": 468,
- "cpu_frame_avg_ms": 0.6635876730769231,
- "glass_cpu_avg_ms": 0.24306059829059828,
- "scene_commit_cpu_avg_ms": 0.20480241452991454,
- "gpu_elapsed_avg_ms": 0.49395333760683763
- },
- "drag": {
- "output_commits": 472,
- "cpu_frame_avg_ms": 0.6952232215189873,
- "glass_cpu_avg_ms": 0.23402406962025316,
- "scene_commit_cpu_avg_ms": 0.18117687974683544,
- "gpu_elapsed_avg_ms": 0.48322782911392403
- },
- "resize": {
- "output_commits": 448,
- "cpu_frame_avg_ms": 1.255605904017857,
- "glass_cpu_avg_ms": 0.7597682477678571,
- "scene_commit_cpu_avg_ms": 0.23039239285714286,
- "gpu_elapsed_avg_ms": 1.0753209665178571
- },
- "fullscreen": {
- "output_commits": 449,
- "cpu_frame_avg_ms": 0.37371359777777774,
- "glass_cpu_avg_ms": 0.13678009333333332,
- "scene_commit_cpu_avg_ms": 0.13847742666666665,
- "gpu_elapsed_avg_ms": 0.3731055933333333
- },
- "zoom_85": {
- "output_commits": 472,
- "cpu_frame_avg_ms": 0.6025406716101694,
- "glass_cpu_avg_ms": 0.22436382838983052,
- "scene_commit_cpu_avg_ms": 0.17498675211864406,
- "gpu_elapsed_avg_ms": 0.4299543283898305
- },
- "zoom_70": {
- "output_commits": 240,
- "cpu_frame_avg_ms": 0.5919208583333333,
- "glass_cpu_avg_ms": 0.19376155208333334,
- "scene_commit_cpu_avg_ms": 0.17138266458333334,
- "gpu_elapsed_avg_ms": 0.39854790814196245
- },
- "zoom_55": {
- "output_commits": 239,
- "cpu_frame_avg_ms": 0.5620873974895397,
- "glass_cpu_avg_ms": 0.17940184518828453,
- "scene_commit_cpu_avg_ms": 0.17095994142259413,
- "gpu_elapsed_avg_ms": 0.39164171338912135
- },
- "zoom_min_hold": {
- "output_commits": 252,
- "cpu_frame_avg_ms": 0.3789393278008299,
- "glass_cpu_avg_ms": 0.013062441908713692,
- "scene_commit_cpu_avg_ms": 0.14242259336099586,
- "gpu_elapsed_avg_ms": 0.15925473858921163
- }
- },
- "mixed_noglass": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.32155971014492757,
- "glass_cpu_avg_ms": 0.0007601262939958592,
- "scene_commit_cpu_avg_ms": 0.1164271884057971,
- "gpu_elapsed_avg_ms": 0.11662753209109732
- },
- "spinner_glass": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.3496463838174274,
- "glass_cpu_avg_ms": 0.0007894315352697096,
- "scene_commit_cpu_avg_ms": 0.13100969502074689,
- "gpu_elapsed_avg_ms": 0.1348996029106029
- },
- "damage_full": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.3456238589211619,
- "glass_cpu_avg_ms": 0.0007288630705394191,
- "scene_commit_cpu_avg_ms": 0.13606728838174276,
- "gpu_elapsed_avg_ms": 0.16438840663900414
- },
- "drag": {
- "output_commits": 484,
- "cpu_frame_avg_ms": 0.44813230452674896,
- "glass_cpu_avg_ms": 0.0006139979423868312,
- "scene_commit_cpu_avg_ms": 0.194262,
- "gpu_elapsed_avg_ms": 0.2751984670781893
- },
- "resize": {
- "output_commits": 478,
- "cpu_frame_avg_ms": 0.46875288284518823,
- "glass_cpu_avg_ms": 0.0004995878661087866,
- "scene_commit_cpu_avg_ms": 0.23202828870292888,
- "gpu_elapsed_avg_ms": 0.28973428242677823
- },
- "fullscreen": {
- "output_commits": 474,
- "cpu_frame_avg_ms": 0.24631575420168067,
- "glass_cpu_avg_ms": 0.00037793697478991594,
- "scene_commit_cpu_avg_ms": 0.1436160399159664,
- "gpu_elapsed_avg_ms": 0.2809251134453781
- },
- "zoom_85": {
- "output_commits": 254,
- "cpu_frame_avg_ms": 0.3730030809128631,
- "glass_cpu_avg_ms": 0.0007871224066390041,
- "scene_commit_cpu_avg_ms": 0.14310420954356845,
- "gpu_elapsed_avg_ms": 0.14526244190871368
- },
- "zoom_70": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.3622315518672199,
- "glass_cpu_avg_ms": 0.000837908713692946,
- "scene_commit_cpu_avg_ms": 0.13584455809128632,
- "gpu_elapsed_avg_ms": 0.1436778174273859
- },
- "zoom_55": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.34709908506224063,
- "glass_cpu_avg_ms": 0.0008055352697095436,
- "scene_commit_cpu_avg_ms": 0.13149477800829876,
- "gpu_elapsed_avg_ms": 0.13439216804979254
- },
- "zoom_min_hold": {
- "output_commits": 249,
- "cpu_frame_avg_ms": 0.3666524178794179,
- "glass_cpu_avg_ms": 0.0006712806652806653,
- "scene_commit_cpu_avg_ms": 0.1369777546777547,
- "gpu_elapsed_avg_ms": 0.14150717671517674
- }
- }
- }
- },
- "5e-a": {
- "meta": {
- "kernel": "7.2.9-zen1-1-zen",
- "pinned_cpus": [
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9
- ],
- "render_device": "/dev/dri/renderD128",
- "seconds": 4.0,
- "power": {
- "ac_online": true,
- "battery": "Not charging",
- "platform_profile": "performance",
- "governor": "schedutil",
- "epp": "performance",
- "no_turbo": "0"
- },
- "date": "2026-10-11 16:38:36"
- },
- "clean": {
- "scale1": {
- "idle": {
- "cpu_percent": 0.089,
- "instructions_per_s": 204838,
- "cycles_per_s": 222877,
- "rss_anon_kb": 44932
- },
- "spinner_clear": {
- "cpu_percent": 8.694,
- "instructions_per_s": 32174189,
- "cycles_per_s": 45589301,
- "rss_anon_kb": 45588
- },
- "spinner_glass": {
- "cpu_percent": 9.724,
- "instructions_per_s": 46852826,
- "cycles_per_s": 56211443,
- "rss_anon_kb": 45588
- },
- "damage_full": {
- "cpu_percent": 12.778,
- "instructions_per_s": 48918687,
- "cycles_per_s": 76797880,
- "rss_anon_kb": 45588
- },
- "drag": {
- "cpu_percent": 7.349,
- "instructions_per_s": 53950341,
- "cycles_per_s": 49222180,
- "rss_anon_kb": 45588
- },
- "resize": {
- "cpu_percent": 18.009,
- "instructions_per_s": 180124856,
- "cycles_per_s": 130297300,
- "rss_anon_kb": 45588
- },
- "fullscreen": {
- "cpu_percent": 37.573,
- "instructions_per_s": 44039518,
- "cycles_per_s": 295596629,
- "rss_anon_kb": 49468
- },
- "zoom_85": {
- "cpu_percent": 9.261,
- "instructions_per_s": 46914624,
- "cycles_per_s": 56058168,
- "rss_anon_kb": 49468
- },
- "zoom_70": {
- "cpu_percent": 9.441,
- "instructions_per_s": 47709008,
- "cycles_per_s": 55521249,
- "rss_anon_kb": 49648
- },
- "zoom_55": {
- "cpu_percent": 9.509,
- "instructions_per_s": 46978025,
- "cycles_per_s": 56652455,
- "rss_anon_kb": 49656
- },
- "zoom_min_hold": {
- "cpu_percent": 8.754,
- "instructions_per_s": 36758165,
- "cycles_per_s": 51609297,
- "rss_anon_kb": 49876
- }
- },
- "scale1.5": {
- "idle": {
- "cpu_percent": 0.002,
- "instructions_per_s": 146,
- "cycles_per_s": 2120,
- "rss_anon_kb": 48944
- },
- "spinner_clear": {
- "cpu_percent": 8.592,
- "instructions_per_s": 32568085,
- "cycles_per_s": 45657484,
- "rss_anon_kb": 49432
- },
- "spinner_glass": {
- "cpu_percent": 9.743,
- "instructions_per_s": 47194992,
- "cycles_per_s": 55453184,
- "rss_anon_kb": 49628
- },
- "damage_full": {
- "cpu_percent": 12.811,
- "instructions_per_s": 54272049,
- "cycles_per_s": 76925140,
- "rss_anon_kb": 49628
- },
- "drag": {
- "cpu_percent": 6.774,
- "instructions_per_s": 56195107,
- "cycles_per_s": 49162684,
- "rss_anon_kb": 49628
- },
- "resize": {
- "cpu_percent": 21.022,
- "instructions_per_s": 307554293,
- "cycles_per_s": 174050865,
- "rss_anon_kb": 50256
- },
- "fullscreen": {
- "cpu_percent": 41.729,
- "instructions_per_s": 46885007,
- "cycles_per_s": 308139332,
- "rss_anon_kb": 57708
- },
- "zoom_85": {
- "cpu_percent": 9.596,
- "instructions_per_s": 47248267,
- "cycles_per_s": 56419049,
- "rss_anon_kb": 57708
- },
- "zoom_70": {
- "cpu_percent": 9.852,
- "instructions_per_s": 47932035,
- "cycles_per_s": 55534143,
- "rss_anon_kb": 58304
- },
- "zoom_55": {
- "cpu_percent": 9.824,
- "instructions_per_s": 47295730,
- "cycles_per_s": 55725701,
- "rss_anon_kb": 58312
- },
- "zoom_min_hold": {
- "cpu_percent": 8.858,
- "instructions_per_s": 36928754,
- "cycles_per_s": 48852850,
- "rss_anon_kb": 58740
- }
- },
- "mixed": {
- "idle": {
- "cpu_percent": 0.003,
- "instructions_per_s": 151,
- "cycles_per_s": 2844,
- "rss_anon_kb": 48316
- },
- "spinner_clear": {
- "cpu_percent": 8.972,
- "instructions_per_s": 36404512,
- "cycles_per_s": 51238696,
- "rss_anon_kb": 52904
- },
- "spinner_glass": {
- "cpu_percent": 10.289,
- "instructions_per_s": 48757481,
- "cycles_per_s": 62375462,
- "rss_anon_kb": 52904
- },
- "damage_full": {
- "cpu_percent": 12.618,
- "instructions_per_s": 50166611,
- "cycles_per_s": 80915697,
- "rss_anon_kb": 52904
- },
- "drag": {
- "cpu_percent": 7.98,
- "instructions_per_s": 60608398,
- "cycles_per_s": 57141781,
- "rss_anon_kb": 52904
- },
- "resize": {
- "cpu_percent": 22.571,
- "instructions_per_s": 332761177,
- "cycles_per_s": 189738001,
- "rss_anon_kb": 52904
- },
- "fullscreen": {
- "cpu_percent": 39.384,
- "instructions_per_s": 73977425,
- "cycles_per_s": 331503790,
- "rss_anon_kb": 57660
- },
- "zoom_85": {
- "cpu_percent": 9.647,
- "instructions_per_s": 50346756,
- "cycles_per_s": 59559034,
- "rss_anon_kb": 57660
- },
- "zoom_70": {
- "cpu_percent": 10.557,
- "instructions_per_s": 50304099,
- "cycles_per_s": 60438297,
- "rss_anon_kb": 58092
- },
- "zoom_55": {
- "cpu_percent": 9.655,
- "instructions_per_s": 50509574,
- "cycles_per_s": 59643168,
- "rss_anon_kb": 58100
- },
- "zoom_min_hold": {
- "cpu_percent": 9.165,
- "instructions_per_s": 41126102,
- "cycles_per_s": 56018885,
- "rss_anon_kb": 58100
- }
- },
- "mixed_noglass": {
- "idle": {
- "cpu_percent": 0.003,
- "instructions_per_s": 151,
- "cycles_per_s": 2413,
- "rss_anon_kb": 47496
- },
- "spinner_clear": {
- "cpu_percent": 8.801,
- "instructions_per_s": 35549374,
- "cycles_per_s": 50710823,
- "rss_anon_kb": 52100
- },
- "spinner_glass": {
- "cpu_percent": 8.616,
- "instructions_per_s": 37498338,
- "cycles_per_s": 50770240,
- "rss_anon_kb": 52100
- },
- "damage_full": {
- "cpu_percent": 11.541,
- "instructions_per_s": 41287677,
- "cycles_per_s": 73528980,
- "rss_anon_kb": 52100
- },
- "drag": {
- "cpu_percent": 6.5,
- "instructions_per_s": 40379164,
- "cycles_per_s": 44573786,
- "rss_anon_kb": 52100
- },
- "resize": {
- "cpu_percent": 19.534,
- "instructions_per_s": 303399603,
- "cycles_per_s": 173573301,
- "rss_anon_kb": 52100
- },
- "fullscreen": {
- "cpu_percent": 20.556,
- "instructions_per_s": 29408654,
- "cycles_per_s": 178873474,
- "rss_anon_kb": 56560
- },
- "zoom_85": {
- "cpu_percent": 9.011,
- "instructions_per_s": 38167736,
- "cycles_per_s": 52115052,
- "rss_anon_kb": 56560
- },
- "zoom_70": {
- "cpu_percent": 9.225,
- "instructions_per_s": 38294757,
- "cycles_per_s": 51515584,
- "rss_anon_kb": 57024
- },
- "zoom_55": {
- "cpu_percent": 9.233,
- "instructions_per_s": 38497248,
- "cycles_per_s": 50863322,
- "rss_anon_kb": 57024
- },
- "zoom_min_hold": {
- "cpu_percent": 9.407,
- "instructions_per_s": 38701025,
- "cycles_per_s": 52443212,
- "rss_anon_kb": 57024
- }
- }
- },
- "stats": {
- "scale1": {
- "idle": {
- "output_commits": 1,
- "cpu_frame_avg_ms": 0.9890285,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.2516895,
- "gpu_elapsed_avg_ms": 0.5053125
- },
- "spinner_clear": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.5450946265560166,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.25367826141078836,
- "gpu_elapsed_avg_ms": 0.24507024066390043
- },
- "spinner_glass": {
- "output_commits": 239,
- "cpu_frame_avg_ms": 0.7244325481171549,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.4295896861924686,
- "gpu_elapsed_avg_ms": 0.6214217573221757
- },
- "damage_full": {
- "output_commits": 239,
- "cpu_frame_avg_ms": 0.7112804937238494,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.43155086192468617,
- "gpu_elapsed_avg_ms": 0.644147460251046
- },
- "drag": {
- "output_commits": 238,
- "cpu_frame_avg_ms": 0.9159406485355649,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.5772264184100419,
- "gpu_elapsed_avg_ms": 1.0149357615062762
- },
- "resize": {
- "output_commits": 235,
- "cpu_frame_avg_ms": 0.978628455319149,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.5352154893617022,
- "gpu_elapsed_avg_ms": 0.9413962638297872
- },
- "fullscreen": {
- "output_commits": 228,
- "cpu_frame_avg_ms": 0.37249162719298246,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.23740077192982456,
- "gpu_elapsed_avg_ms": 0.5559327017543859
- },
- "zoom_85": {
- "output_commits": 238,
- "cpu_frame_avg_ms": 0.7330486974789916,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.4332445084033614,
- "gpu_elapsed_avg_ms": 0.5828659285714285
- },
- "zoom_70": {
- "output_commits": 238,
- "cpu_frame_avg_ms": 0.7763462268907563,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.46071021428571424,
- "gpu_elapsed_avg_ms": 0.5834782016806722
- },
- "zoom_55": {
- "output_commits": 238,
- "cpu_frame_avg_ms": 0.7616145588235294,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.44964861344537815,
- "gpu_elapsed_avg_ms": 0.5539949159663865
- },
- "zoom_min_hold": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.5727405726141078,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.276506,
- "gpu_elapsed_avg_ms": 0.2737078257261411
- }
- },
- "scale1.5": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.5794787717842323,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.2632956058091286,
- "gpu_elapsed_avg_ms": 0.26193339419087136
- },
- "spinner_glass": {
- "output_commits": 238,
- "cpu_frame_avg_ms": 0.7512964747899159,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.4471795168067227,
- "gpu_elapsed_avg_ms": 0.8727406764705882
- },
- "damage_full": {
- "output_commits": 238,
- "cpu_frame_avg_ms": 0.7928659033613445,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.4937115714285714,
- "gpu_elapsed_avg_ms": 0.9752203865546218
- },
- "drag": {
- "output_commits": 237,
- "cpu_frame_avg_ms": 1.0062428823529412,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.6237371512605041,
- "gpu_elapsed_avg_ms": 1.6357612531645571
- },
- "resize": {
- "output_commits": 234,
- "cpu_frame_avg_ms": 1.0240378162393162,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.5773279615384616,
- "gpu_elapsed_avg_ms": 1.3546964316239316
- },
- "fullscreen": {
- "output_commits": 224,
- "cpu_frame_avg_ms": 0.35933121875,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.23087811607142858,
- "gpu_elapsed_avg_ms": 0.8676821659192825
- },
- "zoom_85": {
- "output_commits": 238,
- "cpu_frame_avg_ms": 0.7613520756302521,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.4502082394957983,
- "gpu_elapsed_avg_ms": 0.7988384075630253
- },
- "zoom_70": {
- "output_commits": 238,
- "cpu_frame_avg_ms": 0.7914237268907562,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.4711402521008403,
- "gpu_elapsed_avg_ms": 0.727431487394958
- },
- "zoom_55": {
- "output_commits": 237,
- "cpu_frame_avg_ms": 0.81864105907173,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.481777746835443,
- "gpu_elapsed_avg_ms": 0.6279114050632912
- },
- "zoom_min_hold": {
- "output_commits": 240,
- "cpu_frame_avg_ms": 0.6469842291666666,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.30877351666666664,
- "gpu_elapsed_avg_ms": 0.3124689583333333
- }
- },
- "mixed": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.3530445352697095,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.12461158091286306,
- "gpu_elapsed_avg_ms": 0.12632903526970954
- },
- "spinner_glass": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.38134523125,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.1956561875,
- "gpu_elapsed_avg_ms": 0.2602404375
- },
- "damage_full": {
- "output_commits": 239,
- "cpu_frame_avg_ms": 0.4360637693920335,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.22612200838574423,
- "gpu_elapsed_avg_ms": 0.3009827882599581
- },
- "drag": {
- "output_commits": 479,
- "cpu_frame_avg_ms": 0.5958188731808732,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.3293703929313929,
- "gpu_elapsed_avg_ms": 0.5296445280665281
- },
- "resize": {
- "output_commits": 470,
- "cpu_frame_avg_ms": 0.6483847723404256,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.3789457212765957,
- "gpu_elapsed_avg_ms": 0.6534912361702128
- },
- "fullscreen": {
- "output_commits": 458,
- "cpu_frame_avg_ms": 0.3049508322440087,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.20927635294117647,
- "gpu_elapsed_avg_ms": 0.5887948496732026
- },
- "zoom_85": {
- "output_commits": 252,
- "cpu_frame_avg_ms": 0.4246374479166667,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.21821969791666665,
- "gpu_elapsed_avg_ms": 0.28116197708333335
- },
- "zoom_70": {
- "output_commits": 239,
- "cpu_frame_avg_ms": 0.4327089372384937,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.22460971338912133,
- "gpu_elapsed_avg_ms": 0.3415388888888889
- },
- "zoom_55": {
- "output_commits": 239,
- "cpu_frame_avg_ms": 0.4381787573221757,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.22478705857740586,
- "gpu_elapsed_avg_ms": 0.3000512154811716
- },
- "zoom_min_hold": {
- "output_commits": 251,
- "cpu_frame_avg_ms": 0.37392559834368533,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.14736701863354038,
- "gpu_elapsed_avg_ms": 0.15356118426501034
- }
- },
- "mixed_noglass": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.3472070643153527,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.12199259128630706,
- "gpu_elapsed_avg_ms": 0.12320376348547718
- },
- "spinner_glass": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.3468652939958592,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.12519065010351968,
- "gpu_elapsed_avg_ms": 0.12787234782608695
- },
- "damage_full": {
- "output_commits": 243,
- "cpu_frame_avg_ms": 0.3612034232365145,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.13679817427385893,
- "gpu_elapsed_avg_ms": 0.1643701203319502
- },
- "drag": {
- "output_commits": 484,
- "cpu_frame_avg_ms": 0.45265374691358023,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.19356135596707819,
- "gpu_elapsed_avg_ms": 0.27223863580246915
- },
- "resize": {
- "output_commits": 476,
- "cpu_frame_avg_ms": 0.4829731071428572,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.23259196218487396,
- "gpu_elapsed_avg_ms": 0.29157373739495795
- },
- "fullscreen": {
- "output_commits": 450,
- "cpu_frame_avg_ms": 0.2312745907079646,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.13550615486725665,
- "gpu_elapsed_avg_ms": 0.22996207300884955
- },
- "zoom_85": {
- "output_commits": 254,
- "cpu_frame_avg_ms": 0.36731045945945945,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.13438774636174636,
- "gpu_elapsed_avg_ms": 0.1393694885654886
- },
- "zoom_70": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.3597123995859213,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.13557011801242236,
- "gpu_elapsed_avg_ms": 0.13945943685300205
- },
- "zoom_55": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.3796725601659751,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.14005483817427386,
- "gpu_elapsed_avg_ms": 0.1448720539419087
- },
- "zoom_min_hold": {
- "output_commits": 249,
- "cpu_frame_avg_ms": 0.3786393471933472,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.13875946153846153,
- "gpu_elapsed_avg_ms": 0.14227941995841994
- }
- }
- }
- },
- "5e-b": {
- "meta": {
- "kernel": "7.2.9-zen1-1-zen",
- "pinned_cpus": [
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9
- ],
- "render_device": "/dev/dri/renderD128",
- "seconds": 4.0,
- "power": {
- "ac_online": true,
- "battery": "Not charging",
- "platform_profile": "performance",
- "governor": "schedutil",
- "epp": "performance",
- "no_turbo": "0"
- },
- "date": "2026-10-11 16:46:14"
- },
- "clean": {
- "scale1": {
- "idle": {
- "cpu_percent": 0.002,
- "instructions_per_s": 143,
- "cycles_per_s": 2502,
- "rss_anon_kb": 45472
- },
- "spinner_clear": {
- "cpu_percent": 8.469,
- "instructions_per_s": 32114689,
- "cycles_per_s": 45629220,
- "rss_anon_kb": 46108
- },
- "spinner_glass": {
- "cpu_percent": 9.657,
- "instructions_per_s": 46866887,
- "cycles_per_s": 56654409,
- "rss_anon_kb": 46108
- },
- "damage_full": {
- "cpu_percent": 12.474,
- "instructions_per_s": 49083305,
- "cycles_per_s": 77268632,
- "rss_anon_kb": 46108
- },
- "drag": {
- "cpu_percent": 7.196,
- "instructions_per_s": 54117209,
- "cycles_per_s": 49366731,
- "rss_anon_kb": 46124
- },
- "resize": {
- "cpu_percent": 16.025,
- "instructions_per_s": 180666488,
- "cycles_per_s": 130387985,
- "rss_anon_kb": 46144
- },
- "fullscreen": {
- "cpu_percent": 37.792,
- "instructions_per_s": 45416437,
- "cycles_per_s": 316134871,
- "rss_anon_kb": 49956
- },
- "zoom_85": {
- "cpu_percent": 9.851,
- "instructions_per_s": 46941873,
- "cycles_per_s": 55692208,
- "rss_anon_kb": 49956
- },
- "zoom_70": {
- "cpu_percent": 9.324,
- "instructions_per_s": 47925407,
- "cycles_per_s": 55849892,
- "rss_anon_kb": 50200
- },
- "zoom_55": {
- "cpu_percent": 9.76,
- "instructions_per_s": 46854461,
- "cycles_per_s": 56348029,
- "rss_anon_kb": 50208
- },
- "zoom_min_hold": {
- "cpu_percent": 8.826,
- "instructions_per_s": 36704854,
- "cycles_per_s": 49640148,
- "rss_anon_kb": 50540
- }
- },
- "scale1.5": {
- "idle": {
- "cpu_percent": 0.001,
- "instructions_per_s": 143,
- "cycles_per_s": 2640,
- "rss_anon_kb": 48544
- },
- "spinner_clear": {
- "cpu_percent": 8.56,
- "instructions_per_s": 32274817,
- "cycles_per_s": 46351625,
- "rss_anon_kb": 49032
- },
- "spinner_glass": {
- "cpu_percent": 9.571,
- "instructions_per_s": 47344364,
- "cycles_per_s": 55904039,
- "rss_anon_kb": 49228
- },
- "damage_full": {
- "cpu_percent": 12.668,
- "instructions_per_s": 54409803,
- "cycles_per_s": 80816628,
- "rss_anon_kb": 49228
- },
- "drag": {
- "cpu_percent": 7.113,
- "instructions_per_s": 55963963,
- "cycles_per_s": 49008023,
- "rss_anon_kb": 49228
- },
- "resize": {
- "cpu_percent": 21.33,
- "instructions_per_s": 308121632,
- "cycles_per_s": 174290610,
- "rss_anon_kb": 49852
- },
- "fullscreen": {
- "cpu_percent": 38.112,
- "instructions_per_s": 46375836,
- "cycles_per_s": 318806438,
- "rss_anon_kb": 57708
- },
- "zoom_85": {
- "cpu_percent": 9.961,
- "instructions_per_s": 47248464,
- "cycles_per_s": 55867985,
- "rss_anon_kb": 57708
- },
- "zoom_70": {
- "cpu_percent": 10.044,
- "instructions_per_s": 48172970,
- "cycles_per_s": 56544828,
- "rss_anon_kb": 57976
- },
- "zoom_55": {
- "cpu_percent": 9.775,
- "instructions_per_s": 47387301,
- "cycles_per_s": 55712865,
- "rss_anon_kb": 57984
- },
- "zoom_min_hold": {
- "cpu_percent": 9.114,
- "instructions_per_s": 36926312,
- "cycles_per_s": 48524937,
- "rss_anon_kb": 58408
- }
- },
- "mixed": {
- "idle": {
- "cpu_percent": 0.004,
- "instructions_per_s": 2721,
- "cycles_per_s": 7341,
- "rss_anon_kb": 49212
- },
- "spinner_clear": {
- "cpu_percent": 9.326,
- "instructions_per_s": 36331079,
- "cycles_per_s": 51459291,
- "rss_anon_kb": 53800
- },
- "spinner_glass": {
- "cpu_percent": 9.51,
- "instructions_per_s": 48070661,
- "cycles_per_s": 56373712,
- "rss_anon_kb": 53800
- },
- "damage_full": {
- "cpu_percent": 12.539,
- "instructions_per_s": 50199049,
- "cycles_per_s": 79178010,
- "rss_anon_kb": 53800
- },
- "drag": {
- "cpu_percent": 8.051,
- "instructions_per_s": 61244832,
- "cycles_per_s": 56368365,
- "rss_anon_kb": 53800
- },
- "resize": {
- "cpu_percent": 22.023,
- "instructions_per_s": 332816192,
- "cycles_per_s": 192890878,
- "rss_anon_kb": 53800
- },
- "fullscreen": {
- "cpu_percent": 25.059,
- "instructions_per_s": 50035011,
- "cycles_per_s": 217482482,
- "rss_anon_kb": 58260
- },
- "zoom_85": {
- "cpu_percent": 9.967,
- "instructions_per_s": 50296422,
- "cycles_per_s": 61214824,
- "rss_anon_kb": 58260
- },
- "zoom_70": {
- "cpu_percent": 9.914,
- "instructions_per_s": 50219689,
- "cycles_per_s": 60372864,
- "rss_anon_kb": 58856
- },
- "zoom_55": {
- "cpu_percent": 9.931,
- "instructions_per_s": 50502677,
- "cycles_per_s": 60936139,
- "rss_anon_kb": 58864
- },
- "zoom_min_hold": {
- "cpu_percent": 9.048,
- "instructions_per_s": 41152316,
- "cycles_per_s": 55288713,
- "rss_anon_kb": 58864
- }
- },
- "mixed_noglass": {
- "idle": {
- "cpu_percent": 0.002,
- "instructions_per_s": 151,
- "cycles_per_s": 2487,
- "rss_anon_kb": 48016
- },
- "spinner_clear": {
- "cpu_percent": 8.984,
- "instructions_per_s": 35528297,
- "cycles_per_s": 49332082,
- "rss_anon_kb": 52620
- },
- "spinner_glass": {
- "cpu_percent": 8.997,
- "instructions_per_s": 37437840,
- "cycles_per_s": 51081103,
- "rss_anon_kb": 52620
- },
- "damage_full": {
- "cpu_percent": 12.245,
- "instructions_per_s": 40624811,
- "cycles_per_s": 73081403,
- "rss_anon_kb": 52620
- },
- "drag": {
- "cpu_percent": 6.295,
- "instructions_per_s": 40315600,
- "cycles_per_s": 44104358,
- "rss_anon_kb": 52620
- },
- "resize": {
- "cpu_percent": 18.64,
- "instructions_per_s": 303340577,
- "cycles_per_s": 174142062,
- "rss_anon_kb": 52620
- },
- "fullscreen": {
- "cpu_percent": 20.196,
- "instructions_per_s": 29255945,
- "cycles_per_s": 171021148,
- "rss_anon_kb": 57156
- },
- "zoom_85": {
- "cpu_percent": 9.218,
- "instructions_per_s": 38635664,
- "cycles_per_s": 52436868,
- "rss_anon_kb": 57156
- },
- "zoom_70": {
- "cpu_percent": 8.936,
- "instructions_per_s": 38229544,
- "cycles_per_s": 50556756,
- "rss_anon_kb": 57564
- },
- "zoom_55": {
- "cpu_percent": 9.06,
- "instructions_per_s": 38473271,
- "cycles_per_s": 52023119,
- "rss_anon_kb": 57564
- },
- "zoom_min_hold": {
- "cpu_percent": 9.642,
- "instructions_per_s": 38688292,
- "cycles_per_s": 53268373,
- "rss_anon_kb": 57564
- }
- }
- },
- "stats": {
- "scale1": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.5808783236514523,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.2661577593360996,
- "gpu_elapsed_avg_ms": 0.26026237759336096
- },
- "spinner_glass": {
- "output_commits": 237,
- "cpu_frame_avg_ms": 0.834743729957806,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.493822641350211,
- "gpu_elapsed_avg_ms": 0.6833392700421941
- },
- "damage_full": {
- "output_commits": 238,
- "cpu_frame_avg_ms": 0.7943905042016807,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.48068956722689077,
- "gpu_elapsed_avg_ms": 0.6962580966386555
- },
- "drag": {
- "output_commits": 236,
- "cpu_frame_avg_ms": 1.028660911392405,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.6450626160337553,
- "gpu_elapsed_avg_ms": 1.0815939409282702
- },
- "resize": {
- "output_commits": 235,
- "cpu_frame_avg_ms": 0.9855712723404255,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.5440840510638298,
- "gpu_elapsed_avg_ms": 0.9353233829787234
- },
- "fullscreen": {
- "output_commits": 234,
- "cpu_frame_avg_ms": 0.36830300427350426,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.2312947307692308,
- "gpu_elapsed_avg_ms": 0.5620483675213676
- },
- "zoom_85": {
- "output_commits": 239,
- "cpu_frame_avg_ms": 0.7175431380753138,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.4246056234309623,
- "gpu_elapsed_avg_ms": 0.5707742803347281
- },
- "zoom_70": {
- "output_commits": 238,
- "cpu_frame_avg_ms": 0.7848564873949581,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.4665308655462185,
- "gpu_elapsed_avg_ms": 0.5839034327731093
- },
- "zoom_55": {
- "output_commits": 238,
- "cpu_frame_avg_ms": 0.743302819327731,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.4384706512605042,
- "gpu_elapsed_avg_ms": 0.5342541974789916
- },
- "zoom_min_hold": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.5850125601659751,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.27954244813278006,
- "gpu_elapsed_avg_ms": 0.2769568921161826
- }
- },
- "scale1.5": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.5310609004149378,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.2442552365145228,
- "gpu_elapsed_avg_ms": 0.2335808132780083
- },
- "spinner_glass": {
- "output_commits": 238,
- "cpu_frame_avg_ms": 0.7516246890756303,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.44626925210084034,
- "gpu_elapsed_avg_ms": 0.8695476848739496
- },
- "damage_full": {
- "output_commits": 238,
- "cpu_frame_avg_ms": 0.7854054663865546,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.4846188487394958,
- "gpu_elapsed_avg_ms": 0.9668498571428572
- },
- "drag": {
- "output_commits": 236,
- "cpu_frame_avg_ms": 1.0182719746835442,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.6360499493670886,
- "gpu_elapsed_avg_ms": 1.6463339367088607
- },
- "resize": {
- "output_commits": 235,
- "cpu_frame_avg_ms": 0.9833615702127659,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.5479462978723404,
- "gpu_elapsed_avg_ms": 1.3315050382978724
- },
- "fullscreen": {
- "output_commits": 223,
- "cpu_frame_avg_ms": 0.3629610933333333,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.23391991555555555,
- "gpu_elapsed_avg_ms": 0.8816131688888889
- },
- "zoom_85": {
- "output_commits": 239,
- "cpu_frame_avg_ms": 0.6774475355648536,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.4016863933054393,
- "gpu_elapsed_avg_ms": 0.7501198535564854
- },
- "zoom_70": {
- "output_commits": 239,
- "cpu_frame_avg_ms": 0.7148739288702929,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.4263896359832636,
- "gpu_elapsed_avg_ms": 0.6791956652719665
- },
- "zoom_55": {
- "output_commits": 238,
- "cpu_frame_avg_ms": 0.7347477689075631,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.43297247899159663,
- "gpu_elapsed_avg_ms": 0.5752411554621849
- },
- "zoom_min_hold": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.575817867219917,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.27372490041493774,
- "gpu_elapsed_avg_ms": 0.270760091286307
- }
- },
- "mixed": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.3256485051759834,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.1206197784679089,
- "gpu_elapsed_avg_ms": 0.1212523850931677
- },
- "spinner_glass": {
- "output_commits": 240,
- "cpu_frame_avg_ms": 0.3790576,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.19984624791666666,
- "gpu_elapsed_avg_ms": 0.2635490520833333
- },
- "damage_full": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.40221555301455303,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.20941798960498959,
- "gpu_elapsed_avg_ms": 0.28587707692307696
- },
- "drag": {
- "output_commits": 479,
- "cpu_frame_avg_ms": 0.6141114844074844,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.3379505821205821,
- "gpu_elapsed_avg_ms": 0.5338840415800417
- },
- "resize": {
- "output_commits": 470,
- "cpu_frame_avg_ms": 0.6526342063829788,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.3816900893617021,
- "gpu_elapsed_avg_ms": 0.6494148659574469
- },
- "fullscreen": {
- "output_commits": 454,
- "cpu_frame_avg_ms": 0.35459683006535947,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.24161813725490197,
- "gpu_elapsed_avg_ms": 0.6394767581699347
- },
- "zoom_85": {
- "output_commits": 253,
- "cpu_frame_avg_ms": 0.4312512860125261,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.22192093319415448,
- "gpu_elapsed_avg_ms": 0.28780128183716075
- },
- "zoom_70": {
- "output_commits": 238,
- "cpu_frame_avg_ms": 0.45103861425576525,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.2284184067085954,
- "gpu_elapsed_avg_ms": 0.3511088176100629
- },
- "zoom_55": {
- "output_commits": 240,
- "cpu_frame_avg_ms": 0.45281806874999997,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.21298285,
- "gpu_elapsed_avg_ms": 0.29044533125
- },
- "zoom_min_hold": {
- "output_commits": 250,
- "cpu_frame_avg_ms": 0.3885594968814969,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.15834501455301456,
- "gpu_elapsed_avg_ms": 0.16822690416666666
- }
- },
- "mixed_noglass": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.3361464513457557,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.11915627329192546,
- "gpu_elapsed_avg_ms": 0.1189754844720497
- },
- "spinner_glass": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.35820793167701864,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.12943806004140787,
- "gpu_elapsed_avg_ms": 0.13688904140786748
- },
- "damage_full": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.36985996881496885,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.14238090644490642,
- "gpu_elapsed_avg_ms": 0.17131818711018712
- },
- "drag": {
- "output_commits": 485,
- "cpu_frame_avg_ms": 0.4708302997946612,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.19621970431211497,
- "gpu_elapsed_avg_ms": 0.27906755852156057
- },
- "resize": {
- "output_commits": 478,
- "cpu_frame_avg_ms": 0.45232476359832635,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.21932469456066944,
- "gpu_elapsed_avg_ms": 0.28596232845188285
- },
- "fullscreen": {
- "output_commits": 452,
- "cpu_frame_avg_ms": 0.24812270329670327,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.14388524615384615,
- "gpu_elapsed_avg_ms": 0.23737353626373625
- },
- "zoom_85": {
- "output_commits": 254,
- "cpu_frame_avg_ms": 0.36505814345114346,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.13386262370062368,
- "gpu_elapsed_avg_ms": 0.14080009563409562
- },
- "zoom_70": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.3398793367983368,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.12917198336798336,
- "gpu_elapsed_avg_ms": 0.13093175675675675
- },
- "zoom_55": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.35832825726141077,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.13278674688796682,
- "gpu_elapsed_avg_ms": 0.13765356224066388
- },
- "zoom_min_hold": {
- "output_commits": 251,
- "cpu_frame_avg_ms": 0.3415280414078675,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.12855283022774328,
- "gpu_elapsed_avg_ms": 0.12916247204968945
- }
- }
- }
- },
- "s4-b": {
- "meta": {
- "kernel": "7.2.9-zen1-1-zen",
- "pinned_cpus": [
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9
- ],
- "render_device": "/dev/dri/renderD128",
- "seconds": 4.0,
- "power": {
- "ac_online": true,
- "battery": "Not charging",
- "platform_profile": "performance",
- "governor": "schedutil",
- "epp": "performance",
- "no_turbo": "0"
- },
- "date": "2026-10-11 16:53:53"
- },
- "clean": {
- "scale1": {
- "idle": {
- "cpu_percent": 0.002,
- "instructions_per_s": 143,
- "cycles_per_s": 3038,
- "rss_anon_kb": 45020
- },
- "spinner_clear": {
- "cpu_percent": 9.026,
- "instructions_per_s": 35208886,
- "cycles_per_s": 47749580,
- "rss_anon_kb": 45612
- },
- "spinner_glass": {
- "cpu_percent": 10.684,
- "instructions_per_s": 55164952,
- "cycles_per_s": 64377552,
- "rss_anon_kb": 45644
- },
- "damage_full": {
- "cpu_percent": 12.949,
- "instructions_per_s": 59077164,
- "cycles_per_s": 88597013,
- "rss_anon_kb": 45644
- },
- "drag": {
- "cpu_percent": 7.362,
- "instructions_per_s": 50189325,
- "cycles_per_s": 50871264,
- "rss_anon_kb": 45644
- },
- "resize": {
- "cpu_percent": 19.62,
- "instructions_per_s": 198469767,
- "cycles_per_s": 147016497,
- "rss_anon_kb": 45752
- },
- "fullscreen": {
- "cpu_percent": 37.004,
- "instructions_per_s": 42263963,
- "cycles_per_s": 288411480,
- "rss_anon_kb": 49636
- },
- "zoom_85": {
- "cpu_percent": 11.056,
- "instructions_per_s": 54801963,
- "cycles_per_s": 64292489,
- "rss_anon_kb": 49640
- },
- "zoom_70": {
- "cpu_percent": 10.758,
- "instructions_per_s": 55540104,
- "cycles_per_s": 64813926,
- "rss_anon_kb": 49680
- },
- "zoom_55": {
- "cpu_percent": 10.588,
- "instructions_per_s": 54983392,
- "cycles_per_s": 64346239,
- "rss_anon_kb": 49680
- },
- "zoom_min_hold": {
- "cpu_percent": 8.457,
- "instructions_per_s": 37235560,
- "cycles_per_s": 47748285,
- "rss_anon_kb": 50004
- }
- },
- "scale1.5": {
- "idle": {
- "cpu_percent": 0.002,
- "instructions_per_s": 143,
- "cycles_per_s": 2480,
- "rss_anon_kb": 48808
- },
- "spinner_clear": {
- "cpu_percent": 8.119,
- "instructions_per_s": 35538568,
- "cycles_per_s": 47835508,
- "rss_anon_kb": 49364
- },
- "spinner_glass": {
- "cpu_percent": 10.683,
- "instructions_per_s": 57703251,
- "cycles_per_s": 65479027,
- "rss_anon_kb": 49364
- },
- "damage_full": {
- "cpu_percent": 14.065,
- "instructions_per_s": 64304893,
- "cycles_per_s": 88195048,
- "rss_anon_kb": 49572
- },
- "drag": {
- "cpu_percent": 7.765,
- "instructions_per_s": 51870308,
- "cycles_per_s": 53408595,
- "rss_anon_kb": 49736
- },
- "resize": {
- "cpu_percent": 25.17,
- "instructions_per_s": 323495152,
- "cycles_per_s": 192154513,
- "rss_anon_kb": 50180
- },
- "fullscreen": {
- "cpu_percent": 38.195,
- "instructions_per_s": 44681549,
- "cycles_per_s": 311660052,
- "rss_anon_kb": 58036
- },
- "zoom_85": {
- "cpu_percent": 10.507,
- "instructions_per_s": 56779296,
- "cycles_per_s": 65524833,
- "rss_anon_kb": 58040
- },
- "zoom_70": {
- "cpu_percent": 10.648,
- "instructions_per_s": 58035842,
- "cycles_per_s": 67043260,
- "rss_anon_kb": 58280
- },
- "zoom_55": {
- "cpu_percent": 11.34,
- "instructions_per_s": 57044848,
- "cycles_per_s": 67054822,
- "rss_anon_kb": 58280
- },
- "zoom_min_hold": {
- "cpu_percent": 8.89,
- "instructions_per_s": 37268912,
- "cycles_per_s": 49467566,
- "rss_anon_kb": 58700
- }
- },
- "mixed": {
- "idle": {
- "cpu_percent": 0.004,
- "instructions_per_s": 2721,
- "cycles_per_s": 6332,
- "rss_anon_kb": 48804
- },
- "spinner_clear": {
- "cpu_percent": 9.038,
- "instructions_per_s": 45002313,
- "cycles_per_s": 56575564,
- "rss_anon_kb": 53396
- },
- "spinner_glass": {
- "cpu_percent": 11.905,
- "instructions_per_s": 73657368,
- "cycles_per_s": 72174184,
- "rss_anon_kb": 53396
- },
- "damage_full": {
- "cpu_percent": 15.289,
- "instructions_per_s": 77913592,
- "cycles_per_s": 96853771,
- "rss_anon_kb": 53396
- },
- "drag": {
- "cpu_percent": 8.19,
- "instructions_per_s": 59028766,
- "cycles_per_s": 59414216,
- "rss_anon_kb": 53396
- },
- "resize": {
- "cpu_percent": 25.292,
- "instructions_per_s": 371799755,
- "cycles_per_s": 224571976,
- "rss_anon_kb": 53396
- },
- "fullscreen": {
- "cpu_percent": 39.943,
- "instructions_per_s": 76927690,
- "cycles_per_s": 337750863,
- "rss_anon_kb": 57932
- },
- "zoom_85": {
- "cpu_percent": 12.07,
- "instructions_per_s": 74614630,
- "cycles_per_s": 71337255,
- "rss_anon_kb": 57936
- },
- "zoom_70": {
- "cpu_percent": 10.888,
- "instructions_per_s": 64504652,
- "cycles_per_s": 70418201,
- "rss_anon_kb": 58340
- },
- "zoom_55": {
- "cpu_percent": 10.918,
- "instructions_per_s": 63437013,
- "cycles_per_s": 68255696,
- "rss_anon_kb": 58340
- },
- "zoom_min_hold": {
- "cpu_percent": 9.686,
- "instructions_per_s": 43798693,
- "cycles_per_s": 56853598,
- "rss_anon_kb": 58340
- }
- },
- "mixed_noglass": {
- "idle": {
- "cpu_percent": 0.085,
- "instructions_per_s": 456805,
- "cycles_per_s": 414973,
- "rss_anon_kb": 48288
- },
- "spinner_clear": {
- "cpu_percent": 8.521,
- "instructions_per_s": 35554744,
- "cycles_per_s": 51302496,
- "rss_anon_kb": 53012
- },
- "spinner_glass": {
- "cpu_percent": 8.856,
- "instructions_per_s": 37273161,
- "cycles_per_s": 53351380,
- "rss_anon_kb": 53012
- },
- "damage_full": {
- "cpu_percent": 12.201,
- "instructions_per_s": 40216117,
- "cycles_per_s": 74241893,
- "rss_anon_kb": 53012
- },
- "drag": {
- "cpu_percent": 6.491,
- "instructions_per_s": 40158331,
- "cycles_per_s": 44228500,
- "rss_anon_kb": 53012
- },
- "resize": {
- "cpu_percent": 20.253,
- "instructions_per_s": 302836099,
- "cycles_per_s": 172042667,
- "rss_anon_kb": 53012
- },
- "fullscreen": {
- "cpu_percent": 38.827,
- "instructions_per_s": 49273018,
- "cycles_per_s": 314814648,
- "rss_anon_kb": 57308
- },
- "zoom_85": {
- "cpu_percent": 8.754,
- "instructions_per_s": 38004339,
- "cycles_per_s": 54755425,
- "rss_anon_kb": 57312
- },
- "zoom_70": {
- "cpu_percent": 9.223,
- "instructions_per_s": 38084747,
- "cycles_per_s": 50978867,
- "rss_anon_kb": 57884
- },
- "zoom_55": {
- "cpu_percent": 9.846,
- "instructions_per_s": 38322842,
- "cycles_per_s": 53467453,
- "rss_anon_kb": 57884
- },
- "zoom_min_hold": {
- "cpu_percent": 9.055,
- "instructions_per_s": 38785119,
- "cycles_per_s": 53795765,
- "rss_anon_kb": 57884
- }
- }
- },
- "stats": {
- "scale1": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 240,
- "cpu_frame_avg_ms": 0.6107448041666667,
- "glass_cpu_avg_ms": 0.03539604583333333,
- "scene_commit_cpu_avg_ms": 0.25875282916666664,
- "gpu_elapsed_avg_ms": 0.29949173749999997
- },
- "spinner_glass": {
- "output_commits": 236,
- "cpu_frame_avg_ms": 0.9362865338983051,
- "glass_cpu_avg_ms": 0.4108536313559322,
- "scene_commit_cpu_avg_ms": 0.227747,
- "gpu_elapsed_avg_ms": 0.6473494533898305
- },
- "damage_full": {
- "output_commits": 235,
- "cpu_frame_avg_ms": 0.9702827191489363,
- "glass_cpu_avg_ms": 0.4128287021276596,
- "scene_commit_cpu_avg_ms": 0.2590624085106383,
- "gpu_elapsed_avg_ms": 0.7379664893617021
- },
- "drag": {
- "output_commits": 234,
- "cpu_frame_avg_ms": 1.1553373021276596,
- "glass_cpu_avg_ms": 0.45834531914893617,
- "scene_commit_cpu_avg_ms": 0.31299919148936167,
- "gpu_elapsed_avg_ms": 0.9098521914893617
- },
- "resize": {
- "output_commits": 227,
- "cpu_frame_avg_ms": 1.5051349385964912,
- "glass_cpu_avg_ms": 0.8608630877192982,
- "scene_commit_cpu_avg_ms": 0.2672547938596491,
- "gpu_elapsed_avg_ms": 1.2943005350877193
- },
- "fullscreen": {
- "output_commits": 225,
- "cpu_frame_avg_ms": 0.3551461822222222,
- "glass_cpu_avg_ms": 0.011626675555555556,
- "scene_commit_cpu_avg_ms": 0.21650707555555554,
- "gpu_elapsed_avg_ms": 0.5362264
- },
- "zoom_85": {
- "output_commits": 235,
- "cpu_frame_avg_ms": 0.9661923446808511,
- "glass_cpu_avg_ms": 0.4209318425531915,
- "scene_commit_cpu_avg_ms": 0.23010737872340425,
- "gpu_elapsed_avg_ms": 0.6611560595744681
- },
- "zoom_70": {
- "output_commits": 236,
- "cpu_frame_avg_ms": 0.9211091144067797,
- "glass_cpu_avg_ms": 0.40290174152542374,
- "scene_commit_cpu_avg_ms": 0.22051802118644068,
- "gpu_elapsed_avg_ms": 0.6320212923728813
- },
- "zoom_55": {
- "output_commits": 236,
- "cpu_frame_avg_ms": 0.9166175805084746,
- "glass_cpu_avg_ms": 0.4034346313559322,
- "scene_commit_cpu_avg_ms": 0.21857152966101695,
- "gpu_elapsed_avg_ms": 0.6225695127118644
- },
- "zoom_min_hold": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.5762847396694215,
- "glass_cpu_avg_ms": 0.011234297520661157,
- "scene_commit_cpu_avg_ms": 0.26460209090909087,
- "gpu_elapsed_avg_ms": 0.27249007468879666
- }
- },
- "scale1.5": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 239,
- "cpu_frame_avg_ms": 0.6490354686192469,
- "glass_cpu_avg_ms": 0.038589209205020916,
- "scene_commit_cpu_avg_ms": 0.27449492468619247,
- "gpu_elapsed_avg_ms": 0.3193789246861925
- },
- "spinner_glass": {
- "output_commits": 235,
- "cpu_frame_avg_ms": 0.9753997574468085,
- "glass_cpu_avg_ms": 0.41916301702127656,
- "scene_commit_cpu_avg_ms": 0.24724771914893615,
- "gpu_elapsed_avg_ms": 0.7003872085106383
- },
- "damage_full": {
- "output_commits": 235,
- "cpu_frame_avg_ms": 0.9710923276595744,
- "glass_cpu_avg_ms": 0.3994894425531915,
- "scene_commit_cpu_avg_ms": 0.2926840765957447,
- "gpu_elapsed_avg_ms": 0.8346895404255319
- },
- "drag": {
- "output_commits": 234,
- "cpu_frame_avg_ms": 1.1565845829787234,
- "glass_cpu_avg_ms": 0.4493700340425532,
- "scene_commit_cpu_avg_ms": 0.31942259574468085,
- "gpu_elapsed_avg_ms": 1.0446126127659574
- },
- "resize": {
- "output_commits": 225,
- "cpu_frame_avg_ms": 1.63510764,
- "glass_cpu_avg_ms": 0.926861911111111,
- "scene_commit_cpu_avg_ms": 0.3064732666666667,
- "gpu_elapsed_avg_ms": 1.5948520888888889
- },
- "fullscreen": {
- "output_commits": 118,
- "cpu_frame_avg_ms": 0.3307105611814346,
- "glass_cpu_avg_ms": 0.007370831223628692,
- "scene_commit_cpu_avg_ms": 0.15109186075949366,
- "gpu_elapsed_avg_ms": 0.5165574556962025
- },
- "zoom_85": {
- "output_commits": 235,
- "cpu_frame_avg_ms": 0.971925514893617,
- "glass_cpu_avg_ms": 0.4170728425531915,
- "scene_commit_cpu_avg_ms": 0.2422689106382979,
- "gpu_elapsed_avg_ms": 0.6850066765957447
- },
- "zoom_70": {
- "output_commits": 235,
- "cpu_frame_avg_ms": 1.011860944680851,
- "glass_cpu_avg_ms": 0.4354045574468085,
- "scene_commit_cpu_avg_ms": 0.25754144680851065,
- "gpu_elapsed_avg_ms": 0.7141269957446809
- },
- "zoom_55": {
- "output_commits": 235,
- "cpu_frame_avg_ms": 0.9963658000000001,
- "glass_cpu_avg_ms": 0.42912633191489363,
- "scene_commit_cpu_avg_ms": 0.24923519574468087,
- "gpu_elapsed_avg_ms": 0.6919951191489361
- },
- "zoom_min_hold": {
- "output_commits": 239,
- "cpu_frame_avg_ms": 0.6662546234309623,
- "glass_cpu_avg_ms": 0.012799121338912133,
- "scene_commit_cpu_avg_ms": 0.3042909832635983,
- "gpu_elapsed_avg_ms": 0.32413525941422594
- }
- },
- "mixed": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.353892817805383,
- "glass_cpu_avg_ms": 0.030387975155279502,
- "scene_commit_cpu_avg_ms": 0.116023,
- "gpu_elapsed_avg_ms": 0.14270876811594202
- },
- "spinner_glass": {
- "output_commits": 474,
- "cpu_frame_avg_ms": 0.5508064472573839,
- "glass_cpu_avg_ms": 0.2106539957805907,
- "scene_commit_cpu_avg_ms": 0.15639222573839665,
- "gpu_elapsed_avg_ms": 0.39059301476793246
- },
- "damage_full": {
- "output_commits": 472,
- "cpu_frame_avg_ms": 0.5780975,
- "glass_cpu_avg_ms": 0.21440304449152542,
- "scene_commit_cpu_avg_ms": 0.1773289279661017,
- "gpu_elapsed_avg_ms": 0.44796257203389833
- },
- "drag": {
- "output_commits": 474,
- "cpu_frame_avg_ms": 0.6437604159663866,
- "glass_cpu_avg_ms": 0.21560957983193277,
- "scene_commit_cpu_avg_ms": 0.16678232352941177,
- "gpu_elapsed_avg_ms": 0.453411775210084
- },
- "resize": {
- "output_commits": 452,
- "cpu_frame_avg_ms": 1.1702870154867255,
- "glass_cpu_avg_ms": 0.706042703539823,
- "scene_commit_cpu_avg_ms": 0.21371733628318584,
- "gpu_elapsed_avg_ms": 1.0106267588495574
- },
- "fullscreen": {
- "output_commits": 464,
- "cpu_frame_avg_ms": 0.39791013118279567,
- "glass_cpu_avg_ms": 0.14324873548387096,
- "scene_commit_cpu_avg_ms": 0.14435383655913978,
- "gpu_elapsed_avg_ms": 0.39811598272138227
- },
- "zoom_85": {
- "output_commits": 470,
- "cpu_frame_avg_ms": 0.6153637787234043,
- "glass_cpu_avg_ms": 0.23191752978723404,
- "scene_commit_cpu_avg_ms": 0.1727638,
- "gpu_elapsed_avg_ms": 0.4342456893617021
- },
- "zoom_70": {
- "output_commits": 240,
- "cpu_frame_avg_ms": 0.5795198354166667,
- "glass_cpu_avg_ms": 0.19231475,
- "scene_commit_cpu_avg_ms": 0.16546804583333333,
- "gpu_elapsed_avg_ms": 0.40279242083333333
- },
- "zoom_55": {
- "output_commits": 240,
- "cpu_frame_avg_ms": 0.5519420020833333,
- "glass_cpu_avg_ms": 0.22554652916666668,
- "scene_commit_cpu_avg_ms": 0.11886094791666667,
- "gpu_elapsed_avg_ms": 0.37815883125
- },
- "zoom_min_hold": {
- "output_commits": 249,
- "cpu_frame_avg_ms": 0.3780299833679834,
- "glass_cpu_avg_ms": 0.012094513513513514,
- "scene_commit_cpu_avg_ms": 0.14541134303534303,
- "gpu_elapsed_avg_ms": 0.16415529106029106
- }
- },
- "mixed_noglass": {
- "idle": {
- "output_commits": 2,
- "cpu_frame_avg_ms": 0.789661,
- "glass_cpu_avg_ms": 0.00104375,
- "scene_commit_cpu_avg_ms": 0.17006775,
- "gpu_elapsed_avg_ms": 0.231107
- },
- "spinner_clear": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.33829516356107664,
- "glass_cpu_avg_ms": 0.0007818053830227743,
- "scene_commit_cpu_avg_ms": 0.11955524016563147,
- "gpu_elapsed_avg_ms": 0.12176749689440994
- },
- "spinner_glass": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.34481607276507276,
- "glass_cpu_avg_ms": 0.000800045738045738,
- "scene_commit_cpu_avg_ms": 0.13513754261954264,
- "gpu_elapsed_avg_ms": 0.1391077837837838
- },
- "damage_full": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.3583948049792531,
- "glass_cpu_avg_ms": 0.0008262738589211618,
- "scene_commit_cpu_avg_ms": 0.14240310995850622,
- "gpu_elapsed_avg_ms": 0.17034595850622405
- },
- "drag": {
- "output_commits": 484,
- "cpu_frame_avg_ms": 0.44322583127572013,
- "glass_cpu_avg_ms": 0.0006206028806584362,
- "scene_commit_cpu_avg_ms": 0.1934035082304527,
- "gpu_elapsed_avg_ms": 0.2710953477366255
- },
- "resize": {
- "output_commits": 478,
- "cpu_frame_avg_ms": 0.46853316108786613,
- "glass_cpu_avg_ms": 0.0005115313807531381,
- "scene_commit_cpu_avg_ms": 0.22742380753138075,
- "gpu_elapsed_avg_ms": 0.2905291108786611
- },
- "fullscreen": {
- "output_commits": 360,
- "cpu_frame_avg_ms": 0.22610475854700857,
- "glass_cpu_avg_ms": 0.0003950619658119658,
- "scene_commit_cpu_avg_ms": 0.12003920085470086,
- "gpu_elapsed_avg_ms": 0.1953359893162393
- },
- "zoom_85": {
- "output_commits": 255,
- "cpu_frame_avg_ms": 0.3548990248962655,
- "glass_cpu_avg_ms": 0.0007651099585062241,
- "scene_commit_cpu_avg_ms": 0.1375158029045643,
- "gpu_elapsed_avg_ms": 0.14411727178423236
- },
- "zoom_70": {
- "output_commits": 243,
- "cpu_frame_avg_ms": 0.34177521325051763,
- "glass_cpu_avg_ms": 0.0007619171842650105,
- "scene_commit_cpu_avg_ms": 0.127596950310559,
- "gpu_elapsed_avg_ms": 0.13223020910973085
- },
- "zoom_55": {
- "output_commits": 243,
- "cpu_frame_avg_ms": 0.3302041904761905,
- "glass_cpu_avg_ms": 0.0007350269151138716,
- "scene_commit_cpu_avg_ms": 0.12584499585921324,
- "gpu_elapsed_avg_ms": 0.1284425569358178
- },
- "zoom_min_hold": {
- "output_commits": 250,
- "cpu_frame_avg_ms": 0.3336144626556017,
- "glass_cpu_avg_ms": 0.0006253775933609958,
- "scene_commit_cpu_avg_ms": 0.12544172406639004,
- "gpu_elapsed_avg_ms": 0.12563494605809128
- }
- }
- }
- },
- "s0-b": {
- "meta": {
- "kernel": "7.2.9-zen1-1-zen",
- "pinned_cpus": [
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9
- ],
- "render_device": "/dev/dri/renderD128",
- "seconds": 4.0,
- "power": {
- "ac_online": true,
- "battery": "Not charging",
- "platform_profile": "performance",
- "governor": "schedutil",
- "epp": "performance",
- "no_turbo": "0"
- },
- "date": "2026-10-11 17:01:32"
- },
- "clean": {
- "scale1": {
- "idle": {
- "cpu_percent": 0.106,
- "instructions_per_s": 338381,
- "cycles_per_s": 302595,
- "rss_anon_kb": 42908
- },
- "spinner_clear": {
- "cpu_percent": 8.289,
- "instructions_per_s": 37257162,
- "cycles_per_s": 47190391,
- "rss_anon_kb": 43548
- },
- "spinner_glass": {
- "cpu_percent": 11.154,
- "instructions_per_s": 66323047,
- "cycles_per_s": 65791382,
- "rss_anon_kb": 43564
- },
- "damage_full": {
- "cpu_percent": 18.598,
- "instructions_per_s": 86672353,
- "cycles_per_s": 132547516,
- "rss_anon_kb": 43564
- },
- "drag": {
- "cpu_percent": 8.017,
- "instructions_per_s": 72025337,
- "cycles_per_s": 58011480,
- "rss_anon_kb": 43648
- },
- "resize": {
- "cpu_percent": 21.958,
- "instructions_per_s": 306618363,
- "cycles_per_s": 192510476,
- "rss_anon_kb": 43676
- },
- "fullscreen": {
- "cpu_percent": 36.306,
- "instructions_per_s": 59674815,
- "cycles_per_s": 307332970,
- "rss_anon_kb": 47556
- },
- "zoom_85": {
- "cpu_percent": 10.134,
- "instructions_per_s": 64343820,
- "cycles_per_s": 66691884,
- "rss_anon_kb": 47556
- },
- "zoom_70": {
- "cpu_percent": 10.182,
- "instructions_per_s": 66667953,
- "cycles_per_s": 65948843,
- "rss_anon_kb": 47668
- },
- "zoom_55": {
- "cpu_percent": 10.534,
- "instructions_per_s": 64289399,
- "cycles_per_s": 67955415,
- "rss_anon_kb": 47668
- },
- "zoom_min_hold": {
- "cpu_percent": 8.231,
- "instructions_per_s": 38290623,
- "cycles_per_s": 48251139,
- "rss_anon_kb": 47992
- }
- },
- "scale1.5": {
- "idle": {
- "cpu_percent": 0.005,
- "instructions_per_s": 2151,
- "cycles_per_s": 8386,
- "rss_anon_kb": 47316
- },
- "spinner_clear": {
- "cpu_percent": 8.037,
- "instructions_per_s": 39369213,
- "cycles_per_s": 48945912,
- "rss_anon_kb": 48008
- },
- "spinner_glass": {
- "cpu_percent": 11.033,
- "instructions_per_s": 69203230,
- "cycles_per_s": 66949947,
- "rss_anon_kb": 48008
- },
- "damage_full": {
- "cpu_percent": 19.782,
- "instructions_per_s": 92365084,
- "cycles_per_s": 131873458,
- "rss_anon_kb": 48008
- },
- "drag": {
- "cpu_percent": 8.516,
- "instructions_per_s": 75086149,
- "cycles_per_s": 61129352,
- "rss_anon_kb": 48108
- },
- "resize": {
- "cpu_percent": 24.978,
- "instructions_per_s": 482520130,
- "cycles_per_s": 260704728,
- "rss_anon_kb": 48368
- },
- "fullscreen": {
- "cpu_percent": 35.211,
- "instructions_per_s": 62530738,
- "cycles_per_s": 328102507,
- "rss_anon_kb": 56436
- },
- "zoom_85": {
- "cpu_percent": 10.605,
- "instructions_per_s": 67581463,
- "cycles_per_s": 65680723,
- "rss_anon_kb": 56436
- },
- "zoom_70": {
- "cpu_percent": 11.226,
- "instructions_per_s": 69210849,
- "cycles_per_s": 66889276,
- "rss_anon_kb": 56908
- },
- "zoom_55": {
- "cpu_percent": 10.635,
- "instructions_per_s": 67832755,
- "cycles_per_s": 69265356,
- "rss_anon_kb": 56908
- },
- "zoom_min_hold": {
- "cpu_percent": 8.93,
- "instructions_per_s": 40149980,
- "cycles_per_s": 48337149,
- "rss_anon_kb": 57328
- }
- },
- "mixed": {
- "idle": {
- "cpu_percent": 0.006,
- "instructions_per_s": 2156,
- "cycles_per_s": 7633,
- "rss_anon_kb": 46424
- },
- "spinner_clear": {
- "cpu_percent": 9.612,
- "instructions_per_s": 46571478,
- "cycles_per_s": 55591350,
- "rss_anon_kb": 51012
- },
- "spinner_glass": {
- "cpu_percent": 12.74,
- "instructions_per_s": 86078377,
- "cycles_per_s": 73573072,
- "rss_anon_kb": 51012
- },
- "damage_full": {
- "cpu_percent": 20.072,
- "instructions_per_s": 107988035,
- "cycles_per_s": 133538334,
- "rss_anon_kb": 51012
- },
- "drag": {
- "cpu_percent": 8.969,
- "instructions_per_s": 78420786,
- "cycles_per_s": 63211869,
- "rss_anon_kb": 51016
- },
- "resize": {
- "cpu_percent": 33.942,
- "instructions_per_s": 536296560,
- "cycles_per_s": 281875654,
- "rss_anon_kb": 51016
- },
- "fullscreen": {
- "cpu_percent": 41.393,
- "instructions_per_s": 87305666,
- "cycles_per_s": 330861755,
- "rss_anon_kb": 55724
- },
- "zoom_85": {
- "cpu_percent": 12.747,
- "instructions_per_s": 86062919,
- "cycles_per_s": 75415529,
- "rss_anon_kb": 55724
- },
- "zoom_70": {
- "cpu_percent": 11.999,
- "instructions_per_s": 76511789,
- "cycles_per_s": 77455941,
- "rss_anon_kb": 56240
- },
- "zoom_55": {
- "cpu_percent": 12.488,
- "instructions_per_s": 76914158,
- "cycles_per_s": 73170246,
- "rss_anon_kb": 56240
- },
- "zoom_min_hold": {
- "cpu_percent": 9.669,
- "instructions_per_s": 43739685,
- "cycles_per_s": 56346334,
- "rss_anon_kb": 56240
- }
- },
- "mixed_noglass": {
- "idle": {
- "cpu_percent": 0.007,
- "instructions_per_s": 2156,
- "cycles_per_s": 7042,
- "rss_anon_kb": 45932
- },
- "spinner_clear": {
- "cpu_percent": 9.019,
- "instructions_per_s": 36490344,
- "cycles_per_s": 52668378,
- "rss_anon_kb": 50536
- },
- "spinner_glass": {
- "cpu_percent": 8.691,
- "instructions_per_s": 38372904,
- "cycles_per_s": 53216687,
- "rss_anon_kb": 50536
- },
- "damage_full": {
- "cpu_percent": 17.631,
- "instructions_per_s": 62377999,
- "cycles_per_s": 115769520,
- "rss_anon_kb": 50536
- },
- "drag": {
- "cpu_percent": 7.523,
- "instructions_per_s": 58223354,
- "cycles_per_s": 49429360,
- "rss_anon_kb": 50540
- },
- "resize": {
- "cpu_percent": 24.506,
- "instructions_per_s": 457184058,
- "cycles_per_s": 233918581,
- "rss_anon_kb": 50540
- },
- "fullscreen": {
- "cpu_percent": 34.114,
- "instructions_per_s": 54991711,
- "cycles_per_s": 305087767,
- "rss_anon_kb": 54912
- },
- "zoom_85": {
- "cpu_percent": 9.116,
- "instructions_per_s": 39108159,
- "cycles_per_s": 54091637,
- "rss_anon_kb": 54912
- },
- "zoom_70": {
- "cpu_percent": 9.039,
- "instructions_per_s": 41066568,
- "cycles_per_s": 53665450,
- "rss_anon_kb": 55648
- },
- "zoom_55": {
- "cpu_percent": 9.242,
- "instructions_per_s": 41503313,
- "cycles_per_s": 54520800,
- "rss_anon_kb": 55648
- },
- "zoom_min_hold": {
- "cpu_percent": 8.788,
- "instructions_per_s": 39646661,
- "cycles_per_s": 53059052,
- "rss_anon_kb": 55648
- }
- }
- },
- "stats": {
- "scale1": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.4994214008264463,
- "glass_cpu_avg_ms": 0.03147635123966942,
- "scene_commit_cpu_avg_ms": 0.20682897107438017,
- "gpu_elapsed_avg_ms": 0.22838905371900825
- },
- "spinner_glass": {
- "output_commits": 236,
- "cpu_frame_avg_ms": 0.955966906779661,
- "glass_cpu_avg_ms": 0.4228026313559322,
- "scene_commit_cpu_avg_ms": 0.24588711016949152,
- "gpu_elapsed_avg_ms": 0.6906830340425532
- },
- "damage_full": {
- "output_commits": 236,
- "cpu_frame_avg_ms": 0.928692127118644,
- "glass_cpu_avg_ms": 0.39599047033898305,
- "scene_commit_cpu_avg_ms": 0.2667031906779661,
- "gpu_elapsed_avg_ms": 0.709780156779661
- },
- "drag": {
- "output_commits": 234,
- "cpu_frame_avg_ms": 1.2091864936170214,
- "glass_cpu_avg_ms": 0.4563230553191489,
- "scene_commit_cpu_avg_ms": 0.36059774042553194,
- "gpu_elapsed_avg_ms": 0.9343792297872341
- },
- "resize": {
- "output_commits": 225,
- "cpu_frame_avg_ms": 1.6882067066666668,
- "glass_cpu_avg_ms": 0.8447286533333334,
- "scene_commit_cpu_avg_ms": 0.33105497777777776,
- "gpu_elapsed_avg_ms": 1.3205048977777778
- },
- "fullscreen": {
- "output_commits": 188,
- "cpu_frame_avg_ms": 0.3730645744680851,
- "glass_cpu_avg_ms": 0.008314153191489362,
- "scene_commit_cpu_avg_ms": 0.22129534468085107,
- "gpu_elapsed_avg_ms": 0.48369634893617025
- },
- "zoom_85": {
- "output_commits": 235,
- "cpu_frame_avg_ms": 0.9641857659574468,
- "glass_cpu_avg_ms": 0.42739403829787237,
- "scene_commit_cpu_avg_ms": 0.2285354765957447,
- "gpu_elapsed_avg_ms": 0.6723231574468085
- },
- "zoom_70": {
- "output_commits": 237,
- "cpu_frame_avg_ms": 0.9087598101265822,
- "glass_cpu_avg_ms": 0.40162839240506326,
- "scene_commit_cpu_avg_ms": 0.23151272995780592,
- "gpu_elapsed_avg_ms": 0.6435319957805907
- },
- "zoom_55": {
- "output_commits": 235,
- "cpu_frame_avg_ms": 0.9531079489361702,
- "glass_cpu_avg_ms": 0.4229726042553192,
- "scene_commit_cpu_avg_ms": 0.22948002978723403,
- "gpu_elapsed_avg_ms": 0.6619069234042553
- },
- "zoom_min_hold": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.5880873070539419,
- "glass_cpu_avg_ms": 0.012275029045643154,
- "scene_commit_cpu_avg_ms": 0.25947940663900415,
- "gpu_elapsed_avg_ms": 0.2719730788381743
- }
- },
- "scale1.5": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.5509092987551867,
- "glass_cpu_avg_ms": 0.034850684647302906,
- "scene_commit_cpu_avg_ms": 0.23131688381742738,
- "gpu_elapsed_avg_ms": 0.26352137759336103
- },
- "spinner_glass": {
- "output_commits": 234,
- "cpu_frame_avg_ms": 1.0025725042735043,
- "glass_cpu_avg_ms": 0.4293592606837607,
- "scene_commit_cpu_avg_ms": 0.2726128247863248,
- "gpu_elapsed_avg_ms": 0.7288906794871794
- },
- "damage_full": {
- "output_commits": 235,
- "cpu_frame_avg_ms": 0.9692670978723404,
- "glass_cpu_avg_ms": 0.39718784255319145,
- "scene_commit_cpu_avg_ms": 0.31265361276595743,
- "gpu_elapsed_avg_ms": 0.8078537446808511
- },
- "drag": {
- "output_commits": 232,
- "cpu_frame_avg_ms": 1.305019540772532,
- "glass_cpu_avg_ms": 0.4904333433476395,
- "scene_commit_cpu_avg_ms": 0.39765939055793986,
- "gpu_elapsed_avg_ms": 1.0865776566523604
- },
- "resize": {
- "output_commits": 220,
- "cpu_frame_avg_ms": 1.9606936909090908,
- "glass_cpu_avg_ms": 0.9720828818181818,
- "scene_commit_cpu_avg_ms": 0.41536510454545456,
- "gpu_elapsed_avg_ms": 1.6464244636363636
- },
- "fullscreen": {
- "output_commits": 118,
- "cpu_frame_avg_ms": 0.3800118860759494,
- "glass_cpu_avg_ms": 0.0077559620253164555,
- "scene_commit_cpu_avg_ms": 0.19110742194092828,
- "gpu_elapsed_avg_ms": 0.5118991434599156
- },
- "zoom_85": {
- "output_commits": 235,
- "cpu_frame_avg_ms": 0.9955762042553192,
- "glass_cpu_avg_ms": 0.42783509361702127,
- "scene_commit_cpu_avg_ms": 0.25601820000000003,
- "gpu_elapsed_avg_ms": 0.7195297021276595
- },
- "zoom_70": {
- "output_commits": 236,
- "cpu_frame_avg_ms": 0.9450337415254237,
- "glass_cpu_avg_ms": 0.41017532627118647,
- "scene_commit_cpu_avg_ms": 0.25497238559322033,
- "gpu_elapsed_avg_ms": 0.6863000762711865
- },
- "zoom_55": {
- "output_commits": 235,
- "cpu_frame_avg_ms": 0.9868946638297873,
- "glass_cpu_avg_ms": 0.4287501659574468,
- "scene_commit_cpu_avg_ms": 0.25823950212765956,
- "gpu_elapsed_avg_ms": 0.7105338936170212
- },
- "zoom_min_hold": {
- "output_commits": 240,
- "cpu_frame_avg_ms": 0.635289825,
- "glass_cpu_avg_ms": 0.01209635,
- "scene_commit_cpu_avg_ms": 0.286283875,
- "gpu_elapsed_avg_ms": 0.30759723333333333
- }
- },
- "mixed": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.35771963692946057,
- "glass_cpu_avg_ms": 0.03468024481327801,
- "scene_commit_cpu_avg_ms": 0.1081983091286307,
- "gpu_elapsed_avg_ms": 0.13475234232365144
- },
- "spinner_glass": {
- "output_commits": 470,
- "cpu_frame_avg_ms": 0.6196207085106383,
- "glass_cpu_avg_ms": 0.24420274893617022,
- "scene_commit_cpu_avg_ms": 0.17263329148936168,
- "gpu_elapsed_avg_ms": 0.44567330212765954
- },
- "damage_full": {
- "output_commits": 474,
- "cpu_frame_avg_ms": 0.579514947257384,
- "glass_cpu_avg_ms": 0.22215565822784808,
- "scene_commit_cpu_avg_ms": 0.17831465611814346,
- "gpu_elapsed_avg_ms": 0.4427495126582279
- },
- "drag": {
- "output_commits": 472,
- "cpu_frame_avg_ms": 0.6611218016877638,
- "glass_cpu_avg_ms": 0.21696269831223627,
- "scene_commit_cpu_avg_ms": 0.18146522573839663,
- "gpu_elapsed_avg_ms": 0.45888208860759494
- },
- "resize": {
- "output_commits": 438,
- "cpu_frame_avg_ms": 1.4536015456621005,
- "glass_cpu_avg_ms": 0.8207571095890411,
- "scene_commit_cpu_avg_ms": 0.2691031598173516,
- "gpu_elapsed_avg_ms": 1.1600335228310503
- },
- "fullscreen": {
- "output_commits": 464,
- "cpu_frame_avg_ms": 0.3706523663793103,
- "glass_cpu_avg_ms": 0.13068808836206897,
- "scene_commit_cpu_avg_ms": 0.1394695797413793,
- "gpu_elapsed_avg_ms": 0.371433650862069
- },
- "zoom_85": {
- "output_commits": 472,
- "cpu_frame_avg_ms": 0.6206557605932204,
- "glass_cpu_avg_ms": 0.24330977966101694,
- "scene_commit_cpu_avg_ms": 0.17441983262711866,
- "gpu_elapsed_avg_ms": 0.4490925838641189
- },
- "zoom_70": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.5511799334719335,
- "glass_cpu_avg_ms": 0.2209108108108108,
- "scene_commit_cpu_avg_ms": 0.13094956340956343,
- "gpu_elapsed_avg_ms": 0.3886086902286902
- },
- "zoom_55": {
- "output_commits": 241,
- "cpu_frame_avg_ms": 0.5515527983367984,
- "glass_cpu_avg_ms": 0.22963837837837836,
- "scene_commit_cpu_avg_ms": 0.1250887920997921,
- "gpu_elapsed_avg_ms": 0.38754980249480253
- },
- "zoom_min_hold": {
- "output_commits": 251,
- "cpu_frame_avg_ms": 0.3855180539419087,
- "glass_cpu_avg_ms": 0.014951275933609958,
- "scene_commit_cpu_avg_ms": 0.13937507676348548,
- "gpu_elapsed_avg_ms": 0.15807519126819128
- }
- },
- "mixed_noglass": {
- "idle": {
- "output_commits": 0,
- "cpu_frame_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.34187575776397516,
- "glass_cpu_avg_ms": 0.0007179979296066252,
- "scene_commit_cpu_avg_ms": 0.11464497929606626,
- "gpu_elapsed_avg_ms": 0.11694691304347826
- },
- "spinner_glass": {
- "output_commits": 243,
- "cpu_frame_avg_ms": 0.3218954265010352,
- "glass_cpu_avg_ms": 0.0006582608695652174,
- "scene_commit_cpu_avg_ms": 0.11609081780538302,
- "gpu_elapsed_avg_ms": 0.11870297101449276
- },
- "damage_full": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.3265467080745341,
- "glass_cpu_avg_ms": 0.0006275424430641822,
- "scene_commit_cpu_avg_ms": 0.13536433126293995,
- "gpu_elapsed_avg_ms": 0.15936746790890272
- },
- "drag": {
- "output_commits": 482,
- "cpu_frame_avg_ms": 0.5235115309917355,
- "glass_cpu_avg_ms": 0.0007356735537190083,
- "scene_commit_cpu_avg_ms": 0.24226019214876035,
- "gpu_elapsed_avg_ms": 0.31560851239669424
- },
- "resize": {
- "output_commits": 466,
- "cpu_frame_avg_ms": 0.6584439098712447,
- "glass_cpu_avg_ms": 0.0005395386266094421,
- "scene_commit_cpu_avg_ms": 0.30298111587982834,
- "gpu_elapsed_avg_ms": 0.34854881974248925
- },
- "fullscreen": {
- "output_commits": 320,
- "cpu_frame_avg_ms": 0.21981157627118644,
- "glass_cpu_avg_ms": 0.00035680084745762713,
- "scene_commit_cpu_avg_ms": 0.11220882627118643,
- "gpu_elapsed_avg_ms": 0.208701
- },
- "zoom_85": {
- "output_commits": 255,
- "cpu_frame_avg_ms": 0.34908487759336104,
- "glass_cpu_avg_ms": 0.0006652282157676349,
- "scene_commit_cpu_avg_ms": 0.12994621576763485,
- "gpu_elapsed_avg_ms": 0.13274322199170124
- },
- "zoom_70": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.34924773443983403,
- "glass_cpu_avg_ms": 0.0007209024896265559,
- "scene_commit_cpu_avg_ms": 0.13482015975103734,
- "gpu_elapsed_avg_ms": 0.13890927178423237
- },
- "zoom_55": {
- "output_commits": 242,
- "cpu_frame_avg_ms": 0.3489979128630705,
- "glass_cpu_avg_ms": 0.0007174875518672199,
- "scene_commit_cpu_avg_ms": 0.13062858506224065,
- "gpu_elapsed_avg_ms": 0.1361186265560166
- },
- "zoom_min_hold": {
- "output_commits": 252,
- "cpu_frame_avg_ms": 0.3466857950310559,
- "glass_cpu_avg_ms": 0.0006243788819875777,
- "scene_commit_cpu_avg_ms": 0.1248578447204969,
- "gpu_elapsed_avg_ms": 0.12731161283643894
- }
- }
- }
- }
- }
-}
diff --git a/docs/plans/scene-graph-stage5.md b/docs/plans/scene-graph-stage5.md
deleted file mode 100644
index 9042996..0000000
--- a/docs/plans/scene-graph-stage5.md
+++ /dev/null
@@ -1,300 +0,0 @@
-# Scene graph plan, stage 5: backdrop effects in the pass
-
-Status: **done**, 2026-10-11: 5a to 5f; 5f resolved the stage gate's GPU finding. Decisions taken (all as recommended). Stage 4 of
-[scene-graph.md](scene-graph.md) is done (window shapes, analytic shadows, the
-owned pass as the only presenter). This stage moves glass, the blurred backdrop
-behind titlebars, the taskbar and the start and power menus, from its side
-channel (`src/glass.c`) into the owned output pass.
-
-## Goal and exit
-
-An effect is an item in the graph, drawn in paint order by the output pass: copy
-the framebuffer region it samples, blur it, and composite it through the
-target's shape and alpha. No scene re-walk, no private render pass, no per-effect
-GL context switch or `glFlush`, no effect buffers published back into the scene.
-
-Exit:
-
-* Glass looks the same: side by side with `glass.c` at scales 1, 1.5 and mixed,
- for each kind (titlebar, taskbar, panel), within an agreed tolerance; no seam
- with the target, no black at output edges, clipped by the window shape.
-* Idle makes no wakeups, and an effect is not re-blurred when nothing behind it
- changed (typing in a terminal must not re-blur its own titlebar).
-* Cost at the stage gate (run once, after the last sub-stage): CPU per frame
- lower than stage 4 wherever glass is on screen, GPU not above it, anonymous
- memory lower (the per-effect capture, output and intermediate buffers go).
-* `glass.c`'s capture walk, dependency tracking, per-effect contexts, effect
- output buffers and `effect_scale` are deleted.
-
-## What exists today
-
-Verified in the code on 2026-10-11 (`glass.c`, `Output.zig`, `Input.zig`,
-`World.zig`, `scene_output.c`).
-
-* **Four attach sites, three kinds.** `Toplevel` (titlebar, one per window),
- `Taskbar` (taskbar), `start_menu/panel.zig` and `power_menu.zig` (panel).
- Sigma 22, 24 and 26 logical px (times the window zoom), saturation 1.5 or 1.6.
-* **Per frame, before each output build**, `Output.zig` calls
- `glass.Engine.update`, which walks the scene for effect nodes and, per effect,
- walks the **scene prefix** (everything below the effect, across all outputs)
- to hash it and record dependencies; a changed hash re-renders the prefix into
- a private quarter-size capture buffer (`capture_prefix`, its own render pass),
- blurs it twice (49 taps each way) into two per-effect intermediate textures,
- and runs a finish shader (saturation, rounded coverage, alpha chosen against
- the target's alpha so the pair has exactly the coverage) into a per-effect
- output buffer, which is set on the effect's scene node. The owned pass then
- draws that node as an ordinary texture (`REDIWM_ITEM_EFFECT`).
-* **Dependencies** (`glass_dependency`) keep every commit of every surface below
- an effect until the effect next looks, so a commit beneath an opaque window
- still invalidates the blur. Things above the effect (the window's own client)
- are not dependencies: typing in a terminal never re-blurs its titlebar.
-* **Holds.** A dragged window's titlebar keeps its blur until release when it is
- at least 98 % opaque (`Input.heldGlass`), and camera pans, pinches and zoom
- animations hold every effect (`World.holdingGlass`). The default theme
- (window_bg 0.80) does not hold titlebars.
-* **One scale per effect** (`effect_scale`): the sharpest output the target
- touches, because one scene node shows one buffer. It had to be made
- output-independent to stop mixed-scale desktops re-blurring forever.
-* **Cost** (memory notes and stage 0): about 0.35 ms per re-blurred effect, CPU
- dominated by the prefix walk, the private pass and the flush; the stage 1 spike
- did the same blur in-pass for 0.006-0.019 ms CPU and the same GPU.
-* **Memory** per effect: a capture buffer, two intermediate textures and two
- output buffers. Two GL programs (blur, finish), about 280 KiB.
-
-## The design problem: what invalidates a blur
-
-The spike's rule (stage 1, gate 8) is that an effect copies the framebuffer at
-its place in paint order. With buffer age, pixels outside this frame's damage
-hold the **last frame's final image**, which includes everything drawn above the
-effect (the window's own client, other windows). So whenever an effect is
-re-blurred, its whole sample extent (target plus 3 sigma padding) must be
-repainted from the bottom up first: damage expands to the padded extent. And
-culling must not drop items below the effect inside the padded extent even when
-an opaque item above the effect hides them on screen.
-
-That is correct but, applied to every damage, it re-blurs a titlebar whenever
-its own client commits (the client lies inside the titlebar's padding): every
-keystroke, every video frame. Today's dependency tracking avoids that. Hence D1.
-
-## Decisions (taken 2026-10-11, all as recommended)
-
-Taken: D1 (B) re-blur only on below-damage with a cached blur per effect and
-output; D2 (A) holds kept as cache reuse; D3 (A) per output; D4 (A) composite as
-a shaped-program mode, one blur program, plain programs dropped if free.
-
-* **D1. When an effect is re-blurred.**
- * (A) Whenever any damage touches its padded extent. Simplest; deletes all
- caching. Re-blurs titlebars on their own client's commits: a GPU cost of
- about 0.2 ms per frame per visible glass titlebar during ordinary use.
- * (B) **Recommended.** Only when something *below* the effect changed in its
- padded extent: the graph attributes damage to items (resolve already knows
- each leaf's commit damage, buffer replacement and geometry change), so the
- pass can tell below-damage from above-damage. Each effect keeps its last
- blur as one small quarter-size texture per output; when nothing below
- changed, a damaged target is composited from that texture without copying
- or blurring. Keeps today's "typing never re-blurs" property at a fraction of
- today's memory.
- * (C) Keep a per-effect offscreen prefix render, as `glass.c` does, but driven
- by the pass's item list. Keeps the behaviour but not the saving: still a
- second render of everything behind each effect.
-* **D2. Holds.** The master plan said to delete the drag hold. With D1 (B) a
- hold costs nothing extra: it is "reuse the cached blur, do not re-blur".
- * (A) **Recommended.** Keep both holds (drag at ≥ 98 % opacity, camera motion)
- as cache reuse; the separate hold machinery in `glass.c` goes.
- * (B) Delete them: blur stays live while dragging and panning, at the re-blur
- cost every frame of the motion (today's cost when the hold does not apply).
-* **D3. Multi-output.** (A) **Recommended**: an effect is drawn per output at that
- output's scale from that output's framebuffer; a window spanning two outputs
- blurs each side with what that output shows, replicating the edge where it
- ends. Removes `effect_scale` and the mixed-scale idle-loop hazard by
- construction. (B) Keep one blur per effect at the sharpest scale, as today:
- needs the cross-output prefix, i.e. D1 (C).
-* **D4. Programs.** (A) **Recommended**: the composite becomes mode 3 of the
- existing shaped program (it already has the shape, coverage and ring), and the
- blur is one new program: net one program fewer than today (about 140 KiB).
- Fold in stage 4's memory follow-up here: the three plain programs go if solid
- and texture draws through the shaped program cost nothing measurable (4b
- showed them bit-identical). (B) Port both glass programs as they are.
-
-## Sub-stages
-
-Each leaves a working compositor and its own correctness gates; cost is judged
-once, after 5e (see [scene-graph-stage4.md](scene-graph-stage4.md), Measurement).
-
-* **5a. Damage attribution in the graph.** Every leaf has a stable id
- (`item.id`). `present` appends a damage event (leaf id, layout-space box) to a
- ring the projection owns whenever a leaf's pixels change: commit or owned-buffer
- damage (mapped from buffer coordinates; the whole box under a non-normal
- transform or without damage), a changed box, content or visibility (old and new
- box), a shadow footprint, an unreached or destroyed leaf (its last box). Each
- consumer, one per output, reads the events since its own cursor
- (`rediwm_projection_damage_events`); a cursor older than the ring reports the
- loss, and the consumer treats everything as changed. In 5c an output attributes
- an event to "below an effect" when its leaf is painted below the effect or is
- no longer in the frame, and treats damage no event explains (the taskbar,
- wallpaper, overlays, clip rims) as below too, so attribution can only err
- towards re-blurring. Pure tests in `projection_test.c`.
- Effect items gain their parameters (kind, sigma, saturation, target) in 5c,
- where they stop being glass-rendered buffers.
- *Done.* `item.id`, the event ring (4096 events) and
- `rediwm_projection_damage_events`/`_cursor`; `test_damage_events` covers
- appearance, mapped and unreported buffer damage, moves, hiding, restyles,
- destruction, two consumers and a consumer that falls behind. Content is
- compared per leaf per sync to tell a restyle (about fifteen field compares).
-* **5b. Backdrop primitives in `scene_pass`.** Region copy from the pass's
- framebuffer, the two quarter-size blur passes (unscissored), the composite
- through the shape with the target's alpha. Gates in `test-scene-pass`: the
- result equals `glass.c`'s finish for the same input within tolerance; edge
- replication at the buffer edge; a partial repaint with damage expansion equals
- a full repaint (spike gate 8); no seam between composite and target.
- *Done.* `rediwm_scene_renderer_enable_backdrops`, `rediwm_scene_pass_capture_backdrop`
- (copy into an RGB scratch texture, so an alpha-less scanout buffer can be
- copied; horizontal pass at quarter size into scratch, vertical into the
- caller's `rediwm_backdrop`), `rediwm_scene_pass_add_backdrop` (shaped program
- mode 3: saturation, coverage, the front's alpha made up to the coverage) and
- `rediwm_scene_renderer_destroy_backdrop`. Gates: within **1 level** of an exact
- full-resolution Gaussian on ARGB and XRGB buffers; a step mixes evenly and
- monotonically; the buffer edge replicates; saturation matches glass.c's
- formula; the front's alpha is made up exactly, and an opaque front gets
- nothing; a clipped composite equals the full one. The shaped programs' `front`
- sampler is fixed to unit 1 at link time: two sampler types on unit 0 (the
- external program's) made every shaped draw invalid.
-* **5c. Output pass integration behind `glass.c`.** `scene_output.c` draws effect
- items itself: un-cover the padded extent below an effect while collecting,
- expand damage per D1, keep the per-effect, per-output cache, apply holds per D2.
- `glass.c` stops rendering but still owns attach/configure. Gates: `glass_test`
- converted to the pass, `glass_hold.py`, appearance and window suites, IPC
- screenshots against stage 4 glass within tolerance at 1, 1.5 and mixed.
- *Done.* An effect's box is its target's, derived in resolve (`effect_geometry`
- in `projection.c`, from `rediwm_glass_effect_info`, `glass.h`); collect lifts
- culling inside its padded extent; `decide_effects` reads the output's damage
- events before the damage is handed on and re-takes a blur only for a change
- below it, damage no event explains, a changed region or sigma, or the end of a
- hold that carried it (a moved held blur would otherwise stay frozen after
- release). A re-blur reports the effect box as changed (the damage ring and the
- commit) and repaints the padded extent in this buffer. `glass_reblurs` in the
- performance stats counts re-blurs.
- Gates: `tests/glass_reblur.py` at scales 1 and 1.5: a window's own client
- repainting at full rate under its titlebar re-blurs nothing; a window below
- inside the extent re-blurs it every frame; moved out of it, nothing; moving the
- window re-blurs. Glass against `glass.c` (the 5b binary, IPC screenshots over a
- busy wallpaper): titlebar within **5 levels**, taskbar within **3**, the start
- menu within 3 except its outermost right column (up to **17 levels**, 0.08 to
- 0.14 % of the menu's pixels, where it borders a bright window), at scales 1 and
- 1.5. `glass_hold.py`: mixed-scale idle passes; the drag comparison fails as on
- HEAD before this stage (the drag frame differs by up to 10 levels across the
- titlebar, the released frame matches exactly). The other glass, window, panel,
- damage and capture suites fail only where they did before stage 5.
- Known limit: a software cursor's damage is unexplained, so moving it near glass
- re-blurs (nested and headless sessions only; on KMS the cursor is a plane).
-* **5d. Delete.** The capture walk, dependencies, contexts, effect output
- buffers, intermediate textures, `effect_scale`, `rediwm_glass_project` and the
- effect scene nodes; the Zig `glass.Effect` API shrinks to attach/configure.
- Rewrite the Glass notes in `AGENTS.md`.
- *Done.* `glass.c` is a registry of about 150 lines (attach, configure, holds,
- `rediwm_glass_effect_info`), with no GL, allocator, read fence or projection;
- `rediwm_glass_update`, `rediwm_glass_project` and
- `rediwm_projection_effect_updated` are gone, and `glass_cpu` is no longer
- recorded (the field stays for readers; the work is in `scene_commit_cpu`).
- `glass_test.c` now tests the registry (info, serials, holds, target lifetime,
- allocation failure) and an effect's geometry in the graph at every zoom, with
- no GPU. Writing it found a 5c bug, fixed here: a blur carried by a hold kept
- its moved position after release and was never re-taken; a carried blur is now
- re-taken once the hold ends (`glass_hold.py`'s held case passes: frozen while
- dragged, equal to the reference after release). 5c's `glass_reblurs` field also
- needed the populated serializer fixture.
- D4's last part, also here: the plain solid, texture and external programs are
- gone. The shaped programs are built with the renderer, and a draw without a
- shape skips the distance field on a `use_shape` uniform branch; the 128 parity
- cases through them still equal wlroots exactly (max difference 0), plain and
- without vertex arrays. The pass holds three programs (shaped, shaped external,
- blur) where stage 4 held five and glass.c two more.
-* **5e. Stage cost gate** against stage 4 (and the stage 0 baseline): the same
- harness as 4e, clean sessions for CPU and memory; a same-session GPU
- comparison if the stats timers stay too noisy across builds.
- *Run* (`scene-graph-stage5-cost.json`): ReleaseSafe stage 0 (f6e7b24), stage 4
- (7e7d981) and stage 5 (760f774), interleaved s0, s4, 5e, 5e, s4, s0 on AC power in
- the performance profile (a first run, half in balanced, was discarded). The
- stage 5 pair agrees within 3 % in every clean cell; the stage 4 pair once did
- not (scale-1 fullscreen, a run whose client committed 39 frames instead of
- about 225), and that cell is read against the good run only.
- * **CPU, against stage 4: lower.** Whole-frame CPU (`cpu_frame`, stats
- sessions) is lower in every glass cell: -15 to -57 % at scale 1, -9 to -40 %
- at 1.5, -10 to -46 % mixed; glass plus commit time -16 to -70 %. Instructions
- (clean sessions) are -10 to -36 % wherever glass re-blurs and within ±2 %
- without glass; `drag` reads +4 to +7 % instructions with 5 to 11 % fewer
- cycles. Against stage 0: instructions -2 to -54 %, never higher.
- * **GPU: lower at scale 1 and mixed, higher at 1.5, a finding.** Against stage
- 4, `gpu_elapsed` is -4 to -53 % at scale 1 and mostly lower mixed, but at
- scale 1.5 it rises in the cells that re-blur: `spinner_glass` +23 %,
- `damage_full` +24 %, `drag` +62 % (0.87, 0.97 and 1.64 ms against about 0.71,
- 0.79 and 1.01; both stage 5 runs within 1 %), and `drag` mixed +14 %. Glass
- that does not re-blur costs less (`spinner_clear` -14 %). The cause is the
- design of D1: a re-blur repaints the padded extent at full resolution and
- copies it, where glass.c rendered the scene behind an effect at quarter
- resolution, a sixteenth of the pixels; at 1.5 the extent has 2.25 times the
- device pixels of scale 1. Options are in the decision below.
- * **Memory: about level with stage 4**, -0.1 to -0.4 MiB at scales 1 and 1.5,
- +0.3 to +0.5 MiB mixed (per-output blurs and the shared scratch on two
- outputs), so the four programs D4 removed did not show as the 0.5 MiB they
- cost in isolation. Against stage 0: +1.3 to +2.3 MiB, as after stage 4.
- * **Idle**: 0.00 to 0.11 % CPU on every build and configuration.
-
-## Open after the gate
-
-* **GPU at fractional scale while glass re-blurs** (above). Either accept it
- (CPU is far lower, idle and still glass are unaffected), or render what lies
- below an effect into the quarter-size blur input directly inside the pass,
- instead of repainting the extent at full resolution and copying it: D1 (C)
- without its scene walk or context switch, as a second draw of the items below
- the effect into the small target.
-* glass_hold.py's drag comparison and the start menu's outer column (5c).
-
-## 5f. Quarter-size backdrops (decided 2026-10-11: fix the GPU finding)
-
-A re-blur draws the items below the effect, bottom up, straight into a
-quarter-size image of its padded extent inside the pass (a redirect: between
-`rediwm_scene_pass_begin_backdrop` and `_end_backdrop` every draw lands in the
-small image, boxes and scissors scaled by a quarter), then blurs that image. No
-framebuffer copy, no repaint of the extent at full resolution, no damage
-expansion: a re-blur changes only the effect's own box. Collect keeps items an
-effect reads even where opaque surfaces above hide them, as backdrop-only
-entries the main pass does not draw. Gates: the 5b pixel gates on the new
-capture, `glass_reblur.py`, the glass comparison against glass.c, and a
-same-day GPU comparison against 5e at scale 1.5.
-
-*Done.* Three changes, each measured in a same-session A/B against stage 4
-(ReleaseSafe, performance profile, `scene_baseline.py`, which now records
-`glass_reblurs`):
-* **Draw below, at reduced size.** `rediwm_scene_pass_begin_backdrop`/`_end_backdrop`
- redirect the pass (boxes, shape origins and scissors move into the image) and
- `render_entry` draws the items below in a backdrop mode (whole box, not what is
- visible on screen), skipping items that opaque items below the effect hide.
- `capture_backdrop`, the framebuffer copy and the damage expansion are gone.
-* **A quarter of the logical size**, as glass.c blurred (factor 4 times the
- output scale): a quarter of the device size cost 2.25 times the pixels at 1.5.
- At factor 6 a band edge moves by up to half a reduced pixel, so the blur gate
- bounds it at 15 levels there (2 where the grid aligns); glass.c had the same.
-* **Damage events only for leaves that paint.** A drag re-blurred 2.74 effects
- a frame: the dragged window's resize grab, an input-only node, moved with it,
- was in no frame's list and so read as a change below two other titlebars. Now
- a drag re-blurs once a frame (its own titlebar), a resize 1.28 times.
-Result (final run): against stage 4, GPU in the glass cells -3 to -38 % except
-`drag` (+1 % at scale 1, -7 % at 1.5, +4 % mixed) and `zoom_70` at scale 1
-(+11 %, within its stage 4 pair's 50 % spread); whole-frame CPU -8 to -43 %; anonymous memory
-0.05 to 0.6 MiB below stage 4 in every cell; idle zero. The fullscreen cell is
-not comparable across sessions (the client's own rate varied from 118 to 229
-commits). Glass against glass.c: titlebar within 5 levels, taskbar within 1,
-start menu as in 5c. The software cursor's boxes now count as explained damage
-(it is drawn over everything), which keeps headless and nested runs honest.
-
-## Risks
-
-* **Stale blur.** Missing a below-damage leaves an old blur on screen. The
- attribution tests in 5a and a forced-full-repaint comparison in 5c cover it.
-* **Over-repaint.** Expanding damage to padded extents makes the damaged area
- larger than today's on every re-blur; the gain is in CPU, not in pixels.
-* **Glass across outputs** looks different at the output edge under D3 (A): the
- edge is replicated rather than the other output's content.
-* **Capture.** Screenshots and screencopy already build through the pass and get
- glass for free; window capture draws the client alone and is unaffected.
diff --git a/docs/plans/scene-graph-stage6-cost.json b/docs/plans/scene-graph-stage6-cost.json
deleted file mode 100644
index ca6c05b..0000000
--- a/docs/plans/scene-graph-stage6-cost.json
+++ /dev/null
@@ -1,3197 +0,0 @@
-{
- "what": "stage 6 cost gate: stage 5 (07806c3, HEAD before this stage) against the stage 6 tree (07806c3 + uncommitted 6a-6d); ReleaseSafe, scene_baseline clean and stats sessions, interleaved s5, s6, s6, s5, AC power, performance profile, 2026-10-12",
- "runs": {
- "s5-a": {
- "meta": {
- "commit": "07806c3",
- "dirty": true,
- "renderer": "gles2",
- "kernel": "7.2.9-zen1-1-zen",
- "cpu": "12th Gen Intel(R) Core(TM) i9-12900H",
- "pinned_cpus": [
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9
- ],
- "render_device": "/dev/dri/renderD128",
- "seconds": 4.0,
- "power": {
- "ac_online": true,
- "battery": "Not charging",
- "platform_profile": "performance",
- "governor": "schedutil",
- "epp": "performance",
- "no_turbo": "0"
- },
- "date": "2026-10-12 19:20:45"
- },
- "clean": {
- "scale1": {
- "idle": {
- "cpu_percent": 0.001,
- "voluntary_switches_per_s": 0.4,
- "instructions_per_s": 146,
- "cycles_per_s": 2224,
- "rss_kb": 134928,
- "rss_anon_kb": 45196
- },
- "spinner_clear": {
- "cpu_percent": 8.066,
- "voluntary_switches_per_s": 189.7,
- "instructions_per_s": 32451486,
- "cycles_per_s": 47595828,
- "rss_kb": 135700,
- "rss_anon_kb": 45840
- },
- "spinner_glass": {
- "cpu_percent": 8.45,
- "voluntary_switches_per_s": 187.2,
- "instructions_per_s": 52750821,
- "cycles_per_s": 61252582,
- "rss_kb": 135700,
- "rss_anon_kb": 45840
- },
- "damage_full": {
- "cpu_percent": 11.842,
- "voluntary_switches_per_s": 187.5,
- "instructions_per_s": 56573158,
- "cycles_per_s": 90468809,
- "rss_kb": 135700,
- "rss_anon_kb": 45840
- },
- "drag": {
- "cpu_percent": 5.561,
- "voluntary_switches_per_s": 164.3,
- "instructions_per_s": 49448930,
- "cycles_per_s": 50534847,
- "rss_kb": 135764,
- "rss_anon_kb": 45840
- },
- "resize": {
- "cpu_percent": 18.354,
- "voluntary_switches_per_s": 224.0,
- "instructions_per_s": 183366295,
- "cycles_per_s": 132281957,
- "rss_kb": 135988,
- "rss_anon_kb": 46064
- },
- "fullscreen": {
- "cpu_percent": 45.282,
- "voluntary_switches_per_s": 112.7,
- "instructions_per_s": 45191010,
- "cycles_per_s": 348608183,
- "rss_kb": 157768,
- "rss_anon_kb": 49924
- },
- "zoom_85": {
- "cpu_percent": 8.542,
- "voluntary_switches_per_s": 188.2,
- "instructions_per_s": 52502306,
- "cycles_per_s": 61128711,
- "rss_kb": 139864,
- "rss_anon_kb": 49940
- },
- "zoom_70": {
- "cpu_percent": 8.368,
- "voluntary_switches_per_s": 188.2,
- "instructions_per_s": 53787477,
- "cycles_per_s": 64817025,
- "rss_kb": 139916,
- "rss_anon_kb": 49992
- },
- "zoom_55": {
- "cpu_percent": 8.74,
- "voluntary_switches_per_s": 188.7,
- "instructions_per_s": 52742872,
- "cycles_per_s": 60154025,
- "rss_kb": 139924,
- "rss_anon_kb": 50000
- },
- "zoom_min_hold": {
- "cpu_percent": 7.344,
- "voluntary_switches_per_s": 190.7,
- "instructions_per_s": 37518035,
- "cycles_per_s": 54007249,
- "rss_kb": 140264,
- "rss_anon_kb": 50340
- }
- },
- "scale1.5": {
- "idle": {
- "cpu_percent": 0.001,
- "voluntary_switches_per_s": 0.6,
- "instructions_per_s": 2717,
- "cycles_per_s": 8446,
- "rss_kb": 138504,
- "rss_anon_kb": 48888
- },
- "spinner_clear": {
- "cpu_percent": 7.523,
- "voluntary_switches_per_s": 189.2,
- "instructions_per_s": 32745011,
- "cycles_per_s": 41963287,
- "rss_kb": 139308,
- "rss_anon_kb": 49564
- },
- "spinner_glass": {
- "cpu_percent": 8.979,
- "voluntary_switches_per_s": 187.5,
- "instructions_per_s": 55534242,
- "cycles_per_s": 55343051,
- "rss_kb": 139308,
- "rss_anon_kb": 49564
- },
- "damage_full": {
- "cpu_percent": 12.056,
- "voluntary_switches_per_s": 186.7,
- "instructions_per_s": 63419118,
- "cycles_per_s": 84176539,
- "rss_kb": 139320,
- "rss_anon_kb": 49576
- },
- "drag": {
- "cpu_percent": 7.169,
- "voluntary_switches_per_s": 164.1,
- "instructions_per_s": 50519155,
- "cycles_per_s": 47270997,
- "rss_kb": 139552,
- "rss_anon_kb": 49744
- },
- "resize": {
- "cpu_percent": 20.816,
- "voluntary_switches_per_s": 229.2,
- "instructions_per_s": 311043324,
- "cycles_per_s": 174912562,
- "rss_kb": 139600,
- "rss_anon_kb": 49792
- },
- "fullscreen": {
- "cpu_percent": 43.755,
- "voluntary_switches_per_s": 95.2,
- "instructions_per_s": 45854137,
- "cycles_per_s": 319314243,
- "rss_kb": 150992,
- "rss_anon_kb": 57600
- },
- "zoom_85": {
- "cpu_percent": 8.872,
- "voluntary_switches_per_s": 188.0,
- "instructions_per_s": 54729029,
- "cycles_per_s": 55266543,
- "rss_kb": 147424,
- "rss_anon_kb": 57616
- },
- "zoom_70": {
- "cpu_percent": 8.73,
- "voluntary_switches_per_s": 187.7,
- "instructions_per_s": 56336617,
- "cycles_per_s": 54192560,
- "rss_kb": 148028,
- "rss_anon_kb": 58220
- },
- "zoom_55": {
- "cpu_percent": 8.786,
- "voluntary_switches_per_s": 187.7,
- "instructions_per_s": 54855493,
- "cycles_per_s": 54104014,
- "rss_kb": 148100,
- "rss_anon_kb": 58228
- },
- "zoom_min_hold": {
- "cpu_percent": 8.283,
- "voluntary_switches_per_s": 189.0,
- "instructions_per_s": 37491524,
- "cycles_per_s": 48486062,
- "rss_kb": 148468,
- "rss_anon_kb": 58660
- }
- },
- "mixed": {
- "idle": {
- "cpu_percent": 0.094,
- "voluntary_switches_per_s": 3.6,
- "instructions_per_s": 531949,
- "cycles_per_s": 475916,
- "rss_kb": 137724,
- "rss_anon_kb": 48072
- },
- "spinner_clear": {
- "cpu_percent": 7.028,
- "voluntary_switches_per_s": 247.2,
- "instructions_per_s": 36947968,
- "cycles_per_s": 48365169,
- "rss_kb": 142504,
- "rss_anon_kb": 52660
- },
- "spinner_glass": {
- "cpu_percent": 8.765,
- "voluntary_switches_per_s": 238.7,
- "instructions_per_s": 50768205,
- "cycles_per_s": 64558973,
- "rss_kb": 142696,
- "rss_anon_kb": 52660
- },
- "damage_full": {
- "cpu_percent": 12.897,
- "voluntary_switches_per_s": 248.2,
- "instructions_per_s": 55627928,
- "cycles_per_s": 88375940,
- "rss_kb": 142504,
- "rss_anon_kb": 52660
- },
- "drag": {
- "cpu_percent": 6.728,
- "voluntary_switches_per_s": 177.5,
- "instructions_per_s": 61545783,
- "cycles_per_s": 61174333,
- "rss_kb": 142568,
- "rss_anon_kb": 52660
- },
- "resize": {
- "cpu_percent": 20.806,
- "voluntary_switches_per_s": 235.0,
- "instructions_per_s": 338459492,
- "cycles_per_s": 197687182,
- "rss_kb": 142568,
- "rss_anon_kb": 52660
- },
- "fullscreen": {
- "cpu_percent": 40.493,
- "voluntary_switches_per_s": 136.5,
- "instructions_per_s": 78305906,
- "cycles_per_s": 403267323,
- "rss_kb": 146948,
- "rss_anon_kb": 57040
- },
- "zoom_85": {
- "cpu_percent": 9.539,
- "voluntary_switches_per_s": 236.2,
- "instructions_per_s": 52821254,
- "cycles_per_s": 65196992,
- "rss_kb": 146948,
- "rss_anon_kb": 57040
- },
- "zoom_70": {
- "cpu_percent": 9.188,
- "voluntary_switches_per_s": 243.2,
- "instructions_per_s": 54819460,
- "cycles_per_s": 59898300,
- "rss_kb": 147528,
- "rss_anon_kb": 57620
- },
- "zoom_55": {
- "cpu_percent": 9.523,
- "voluntary_switches_per_s": 246.7,
- "instructions_per_s": 55035699,
- "cycles_per_s": 59230431,
- "rss_kb": 147544,
- "rss_anon_kb": 57636
- },
- "zoom_min_hold": {
- "cpu_percent": 8.597,
- "voluntary_switches_per_s": 242.5,
- "instructions_per_s": 41606674,
- "cycles_per_s": 56801598,
- "rss_kb": 147544,
- "rss_anon_kb": 57636
- }
- },
- "mixed_noglass": {
- "idle": {
- "cpu_percent": 0.002,
- "voluntary_switches_per_s": 0.6,
- "instructions_per_s": 152,
- "cycles_per_s": 2599,
- "rss_kb": 136872,
- "rss_anon_kb": 47472
- },
- "spinner_clear": {
- "cpu_percent": 8.002,
- "voluntary_switches_per_s": 247.5,
- "instructions_per_s": 36215405,
- "cycles_per_s": 52830483,
- "rss_kb": 141668,
- "rss_anon_kb": 52076
- },
- "spinner_glass": {
- "cpu_percent": 7.74,
- "voluntary_switches_per_s": 246.0,
- "instructions_per_s": 37873520,
- "cycles_per_s": 48318061,
- "rss_kb": 141668,
- "rss_anon_kb": 52076
- },
- "damage_full": {
- "cpu_percent": 12.046,
- "voluntary_switches_per_s": 240.0,
- "instructions_per_s": 40920483,
- "cycles_per_s": 75719611,
- "rss_kb": 141668,
- "rss_anon_kb": 52076
- },
- "drag": {
- "cpu_percent": 5.27,
- "voluntary_switches_per_s": 196.5,
- "instructions_per_s": 41451697,
- "cycles_per_s": 45734489,
- "rss_kb": 141732,
- "rss_anon_kb": 52076
- },
- "resize": {
- "cpu_percent": 19.915,
- "voluntary_switches_per_s": 213.2,
- "instructions_per_s": 303689644,
- "cycles_per_s": 167207631,
- "rss_kb": 141732,
- "rss_anon_kb": 52076
- },
- "fullscreen": {
- "cpu_percent": 40.857,
- "voluntary_switches_per_s": 123.2,
- "instructions_per_s": 49662581,
- "cycles_per_s": 322513778,
- "rss_kb": 146180,
- "rss_anon_kb": 56524
- },
- "zoom_85": {
- "cpu_percent": 8.527,
- "voluntary_switches_per_s": 247.7,
- "instructions_per_s": 38451195,
- "cycles_per_s": 49960325,
- "rss_kb": 146180,
- "rss_anon_kb": 56524
- },
- "zoom_70": {
- "cpu_percent": 8.204,
- "voluntary_switches_per_s": 243.7,
- "instructions_per_s": 38656530,
- "cycles_per_s": 52347070,
- "rss_kb": 146748,
- "rss_anon_kb": 57092
- },
- "zoom_55": {
- "cpu_percent": 7.854,
- "voluntary_switches_per_s": 246.7,
- "instructions_per_s": 38903026,
- "cycles_per_s": 46437136,
- "rss_kb": 146748,
- "rss_anon_kb": 57092
- },
- "zoom_min_hold": {
- "cpu_percent": 8.301,
- "voluntary_switches_per_s": 241.2,
- "instructions_per_s": 38968462,
- "cycles_per_s": 48634131,
- "rss_kb": 146748,
- "rss_anon_kb": 57092
- }
- }
- },
- "stats": {
- "scale1": {
- "idle": {
- "output_commits": 0,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0,
- "projection_cpu_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 244,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.37835872540983606,
- "projection_cpu_avg_ms": 0.03191897540983606,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.18955224590163933,
- "gpu_elapsed_avg_ms": 0.15617677459016394
- },
- "spinner_glass": {
- "output_commits": 240,
- "glass_reblurs": 240,
- "cpu_frame_avg_ms": 0.6243169749999999,
- "projection_cpu_avg_ms": 0.038272966666666665,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.390452825,
- "gpu_elapsed_avg_ms": 0.511593925
- },
- "damage_full": {
- "output_commits": 240,
- "glass_reblurs": 240,
- "cpu_frame_avg_ms": 0.6139212375,
- "projection_cpu_avg_ms": 0.03588407083333333,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.39348455833333335,
- "gpu_elapsed_avg_ms": 0.534293375
- },
- "drag": {
- "output_commits": 241,
- "glass_reblurs": 245,
- "cpu_frame_avg_ms": 0.6753770661157025,
- "projection_cpu_avg_ms": 0.07124219008264462,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.41929278925619834,
- "gpu_elapsed_avg_ms": 0.6639029834710743
- },
- "resize": {
- "output_commits": 237,
- "glass_reblurs": 301,
- "cpu_frame_avg_ms": 0.8650034453781512,
- "projection_cpu_avg_ms": 0.2068756512605042,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.49454661344537815,
- "gpu_elapsed_avg_ms": 0.7649282268907562
- },
- "fullscreen": {
- "output_commits": 219,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.4124886905829596,
- "projection_cpu_avg_ms": 0.03169296412556054,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.2605901121076233,
- "gpu_elapsed_avg_ms": 0.6143252511210763
- },
- "zoom_85": {
- "output_commits": 241,
- "glass_reblurs": 254,
- "cpu_frame_avg_ms": 0.5834924232365145,
- "projection_cpu_avg_ms": 0.03555107883817427,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.3693615684647303,
- "gpu_elapsed_avg_ms": 0.47820021161825726
- },
- "zoom_70": {
- "output_commits": 241,
- "glass_reblurs": 254,
- "cpu_frame_avg_ms": 0.6132071576763486,
- "projection_cpu_avg_ms": 0.037069701244813284,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.37620913692946056,
- "gpu_elapsed_avg_ms": 0.5261403541666666
- },
- "zoom_55": {
- "output_commits": 240,
- "glass_reblurs": 252,
- "cpu_frame_avg_ms": 0.6340968333333333,
- "projection_cpu_avg_ms": 0.04100501666666667,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.39543839166666667,
- "gpu_elapsed_avg_ms": 0.4764652833333333
- },
- "zoom_min_hold": {
- "output_commits": 242,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.5388944132231406,
- "projection_cpu_avg_ms": 0.04323542975206611,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.2617519049586777,
- "gpu_elapsed_avg_ms": 0.2607644958677686
- }
- },
- "scale1.5": {
- "idle": {
- "output_commits": 0,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0,
- "projection_cpu_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 243,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.4290031069958848,
- "projection_cpu_avg_ms": 0.0374547037037037,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.21047390123456788,
- "gpu_elapsed_avg_ms": 0.18537854732510287
- },
- "spinner_glass": {
- "output_commits": 240,
- "glass_reblurs": 240,
- "cpu_frame_avg_ms": 0.6591030916666667,
- "projection_cpu_avg_ms": 0.0404251,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.42011919166666667,
- "gpu_elapsed_avg_ms": 0.5508111666666666
- },
- "damage_full": {
- "output_commits": 240,
- "glass_reblurs": 240,
- "cpu_frame_avg_ms": 0.6450627708333334,
- "projection_cpu_avg_ms": 0.0357328375,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.43471343333333334,
- "gpu_elapsed_avg_ms": 0.7296998708333333
- },
- "drag": {
- "output_commits": 241,
- "glass_reblurs": 245,
- "cpu_frame_avg_ms": 0.6735248512396693,
- "projection_cpu_avg_ms": 0.07552801652892563,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.4158653388429752,
- "gpu_elapsed_avg_ms": 0.8918132561983471
- },
- "resize": {
- "output_commits": 235,
- "glass_reblurs": 299,
- "cpu_frame_avg_ms": 1.026949855319149,
- "projection_cpu_avg_ms": 0.25899581276595746,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.5894750255319149,
- "gpu_elapsed_avg_ms": 1.0982724
- },
- "fullscreen": {
- "output_commits": 227,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.4014866740088106,
- "projection_cpu_avg_ms": 0.03129913656387665,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.2610284581497797,
- "gpu_elapsed_avg_ms": 0.9599066814159293
- },
- "zoom_85": {
- "output_commits": 240,
- "glass_reblurs": 253,
- "cpu_frame_avg_ms": 0.6351520708333332,
- "projection_cpu_avg_ms": 0.037097975,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.4038226458333333,
- "gpu_elapsed_avg_ms": 0.5412289499999999
- },
- "zoom_70": {
- "output_commits": 240,
- "glass_reblurs": 253,
- "cpu_frame_avg_ms": 0.6531196708333333,
- "projection_cpu_avg_ms": 0.03801354583333333,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.41555581666666663,
- "gpu_elapsed_avg_ms": 0.5307617458333334
- },
- "zoom_55": {
- "output_commits": 240,
- "glass_reblurs": 253,
- "cpu_frame_avg_ms": 0.6672543958333333,
- "projection_cpu_avg_ms": 0.03989220833333334,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.4290407375,
- "gpu_elapsed_avg_ms": 0.5541981625
- },
- "zoom_min_hold": {
- "output_commits": 244,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.44230574590163935,
- "projection_cpu_avg_ms": 0.034067926229508196,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.22220478688524592,
- "gpu_elapsed_avg_ms": 0.2165373032786885
- }
- },
- "mixed": {
- "idle": {
- "output_commits": 2,
- "glass_reblurs": 2,
- "cpu_frame_avg_ms": 0.6836465,
- "projection_cpu_avg_ms": 0.02181325,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.219269,
- "gpu_elapsed_avg_ms": 0.35807275
- },
- "spinner_clear": {
- "output_commits": 243,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.32045329606625256,
- "projection_cpu_avg_ms": 0.032234954451345756,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.1200023850931677,
- "gpu_elapsed_avg_ms": 0.12145703726708074
- },
- "spinner_glass": {
- "output_commits": 239,
- "glass_reblurs": 239,
- "cpu_frame_avg_ms": 0.4322027306889353,
- "projection_cpu_avg_ms": 0.035029250521920664,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.22777544676409184,
- "gpu_elapsed_avg_ms": 0.3273036388308977
- },
- "damage_full": {
- "output_commits": 240,
- "glass_reblurs": 240,
- "cpu_frame_avg_ms": 0.4305129208333333,
- "projection_cpu_avg_ms": 0.03324286666666667,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.22515194791666665,
- "gpu_elapsed_avg_ms": 0.29179578958333335
- },
- "drag": {
- "output_commits": 483,
- "glass_reblurs": 406,
- "cpu_frame_avg_ms": 0.5267118865979381,
- "projection_cpu_avg_ms": 0.0641873731958763,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.29175955670103093,
- "gpu_elapsed_avg_ms": 0.4308040144329897
- },
- "resize": {
- "output_commits": 473,
- "glass_reblurs": 651,
- "cpu_frame_avg_ms": 0.664824312896406,
- "projection_cpu_avg_ms": 0.13146046088794927,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.39752818604651163,
- "gpu_elapsed_avg_ms": 0.5804113742071881
- },
- "fullscreen": {
- "output_commits": 464,
- "glass_reblurs": 464,
- "cpu_frame_avg_ms": 0.36437633690987126,
- "projection_cpu_avg_ms": 0.022733416309012874,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.24852060729613734,
- "gpu_elapsed_avg_ms": 0.5196267274678111
- },
- "zoom_85": {
- "output_commits": 254,
- "glass_reblurs": 267,
- "cpu_frame_avg_ms": 0.392552734439834,
- "projection_cpu_avg_ms": 0.0317091846473029,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.19776460165975104,
- "gpu_elapsed_avg_ms": 0.24820864315352698
- },
- "zoom_70": {
- "output_commits": 242,
- "glass_reblurs": 250,
- "cpu_frame_avg_ms": 0.37701641493775934,
- "projection_cpu_avg_ms": 0.029802261410788383,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.19247998547717843,
- "gpu_elapsed_avg_ms": 0.2473759002079002
- },
- "zoom_55": {
- "output_commits": 241,
- "glass_reblurs": 254,
- "cpu_frame_avg_ms": 0.37608751867219914,
- "projection_cpu_avg_ms": 0.028878821576763487,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.19316014522821576,
- "gpu_elapsed_avg_ms": 0.2451726846473029
- },
- "zoom_min_hold": {
- "output_commits": 252,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.2893484412371134,
- "projection_cpu_avg_ms": 0.026425911340206186,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.11520007216494844,
- "gpu_elapsed_avg_ms": 0.11982366735537191
- }
- },
- "mixed_noglass": {
- "idle": {
- "output_commits": 0,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0,
- "projection_cpu_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 245,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.30927466735537185,
- "projection_cpu_avg_ms": 0.030129322314049585,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.11204196280991735,
- "gpu_elapsed_avg_ms": 0.120478326446281
- },
- "spinner_glass": {
- "output_commits": 244,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.3248059049586777,
- "projection_cpu_avg_ms": 0.032384229338842975,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.12307288429752067,
- "gpu_elapsed_avg_ms": 0.12740905371900826
- },
- "damage_full": {
- "output_commits": 242,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.3365520807453416,
- "projection_cpu_avg_ms": 0.03253162732919255,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.13555898136645964,
- "gpu_elapsed_avg_ms": 0.18085576604554865
- },
- "drag": {
- "output_commits": 490,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.33609798780487804,
- "projection_cpu_avg_ms": 0.05040808739837398,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.14613738617886177,
- "gpu_elapsed_avg_ms": 0.219122837398374
- },
- "resize": {
- "output_commits": 472,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.580564,
- "projection_cpu_avg_ms": 0.15257531991525425,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.2806300169491525,
- "gpu_elapsed_avg_ms": 0.3754828834745763
- },
- "fullscreen": {
- "output_commits": 458,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.27121729694323143,
- "projection_cpu_avg_ms": 0.01920722270742358,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.16417108515283843,
- "gpu_elapsed_avg_ms": 0.3506368427947598
- },
- "zoom_85": {
- "output_commits": 258,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.28382592164948456,
- "projection_cpu_avg_ms": 0.02670721649484536,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.10927420412371135,
- "gpu_elapsed_avg_ms": 0.1058177443298969
- },
- "zoom_70": {
- "output_commits": 243,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.3474085258799172,
- "projection_cpu_avg_ms": 0.033370654244306415,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.12782226708074534,
- "gpu_elapsed_avg_ms": 0.12847090062111802
- },
- "zoom_55": {
- "output_commits": 240,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.38836581704781703,
- "projection_cpu_avg_ms": 0.03768934095634096,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.14703162577962578,
- "gpu_elapsed_avg_ms": 0.16391435966735968
- },
- "zoom_min_hold": {
- "output_commits": 250,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.34709571842650105,
- "projection_cpu_avg_ms": 0.03243346376811594,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.13045561904761904,
- "gpu_elapsed_avg_ms": 0.12245600621118012
- }
- }
- }
- },
- "s6-a": {
- "meta": {
- "commit": "07806c3",
- "dirty": true,
- "renderer": "gles2",
- "kernel": "7.2.9-zen1-1-zen",
- "cpu": "12th Gen Intel(R) Core(TM) i9-12900H",
- "pinned_cpus": [
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9
- ],
- "render_device": "/dev/dri/renderD128",
- "seconds": 4.0,
- "power": {
- "ac_online": true,
- "battery": "Not charging",
- "platform_profile": "performance",
- "governor": "schedutil",
- "epp": "performance",
- "no_turbo": "0"
- },
- "date": "2026-10-12 19:28:23"
- },
- "clean": {
- "scale1": {
- "idle": {
- "cpu_percent": 0.004,
- "voluntary_switches_per_s": 1.0,
- "instructions_per_s": 7857,
- "cycles_per_s": 12892,
- "rss_kb": 134108,
- "rss_anon_kb": 44644
- },
- "spinner_clear": {
- "cpu_percent": 7.519,
- "voluntary_switches_per_s": 190.0,
- "instructions_per_s": 32693580,
- "cycles_per_s": 47661791,
- "rss_kb": 134896,
- "rss_anon_kb": 45280
- },
- "spinner_glass": {
- "cpu_percent": 8.592,
- "voluntary_switches_per_s": 192.7,
- "instructions_per_s": 53056148,
- "cycles_per_s": 64272076,
- "rss_kb": 134896,
- "rss_anon_kb": 45280
- },
- "damage_full": {
- "cpu_percent": 11.599,
- "voluntary_switches_per_s": 187.0,
- "instructions_per_s": 56964334,
- "cycles_per_s": 98305597,
- "rss_kb": 134896,
- "rss_anon_kb": 45280
- },
- "drag": {
- "cpu_percent": 4.509,
- "voluntary_switches_per_s": 170.7,
- "instructions_per_s": 46608823,
- "cycles_per_s": 54677615,
- "rss_kb": 134960,
- "rss_anon_kb": 45280
- },
- "resize": {
- "cpu_percent": 14.508,
- "voluntary_switches_per_s": 205.0,
- "instructions_per_s": 163245007,
- "cycles_per_s": 125691487,
- "rss_kb": 134976,
- "rss_anon_kb": 45296
- },
- "fullscreen": {
- "cpu_percent": 34.303,
- "voluntary_switches_per_s": 112.2,
- "instructions_per_s": 31018864,
- "cycles_per_s": 207533285,
- "rss_kb": 153188,
- "rss_anon_kb": 49108
- },
- "zoom_85": {
- "cpu_percent": 8.719,
- "voluntary_switches_per_s": 188.7,
- "instructions_per_s": 52869119,
- "cycles_per_s": 60705985,
- "rss_kb": 138804,
- "rss_anon_kb": 49124
- },
- "zoom_70": {
- "cpu_percent": 8.787,
- "voluntary_switches_per_s": 188.2,
- "instructions_per_s": 53736629,
- "cycles_per_s": 57369499,
- "rss_kb": 139052,
- "rss_anon_kb": 49372
- },
- "zoom_55": {
- "cpu_percent": 9.629,
- "voluntary_switches_per_s": 188.0,
- "instructions_per_s": 52781276,
- "cycles_per_s": 59109896,
- "rss_kb": 139060,
- "rss_anon_kb": 49380
- },
- "zoom_min_hold": {
- "cpu_percent": 7.289,
- "voluntary_switches_per_s": 190.7,
- "instructions_per_s": 37773088,
- "cycles_per_s": 52511909,
- "rss_kb": 139280,
- "rss_anon_kb": 49600
- }
- },
- "scale1.5": {
- "idle": {
- "cpu_percent": 0.002,
- "voluntary_switches_per_s": 0.4,
- "instructions_per_s": 146,
- "cycles_per_s": 2722,
- "rss_kb": 136924,
- "rss_anon_kb": 47492
- },
- "spinner_clear": {
- "cpu_percent": 7.447,
- "voluntary_switches_per_s": 190.0,
- "instructions_per_s": 32824411,
- "cycles_per_s": 43812999,
- "rss_kb": 137788,
- "rss_anon_kb": 48164
- },
- "spinner_glass": {
- "cpu_percent": 7.062,
- "voluntary_switches_per_s": 188.7,
- "instructions_per_s": 56061129,
- "cycles_per_s": 61757380,
- "rss_kb": 137788,
- "rss_anon_kb": 48164
- },
- "damage_full": {
- "cpu_percent": 11.332,
- "voluntary_switches_per_s": 191.2,
- "instructions_per_s": 63570115,
- "cycles_per_s": 95256380,
- "rss_kb": 137800,
- "rss_anon_kb": 48176
- },
- "drag": {
- "cpu_percent": 6.289,
- "voluntary_switches_per_s": 166.6,
- "instructions_per_s": 47625314,
- "cycles_per_s": 45515025,
- "rss_kb": 138032,
- "rss_anon_kb": 48344
- },
- "resize": {
- "cpu_percent": 17.961,
- "voluntary_switches_per_s": 231.7,
- "instructions_per_s": 289895316,
- "cycles_per_s": 173439835,
- "rss_kb": 138080,
- "rss_anon_kb": 48392
- },
- "fullscreen": {
- "cpu_percent": 29.541,
- "voluntary_switches_per_s": 168.2,
- "instructions_per_s": 47941864,
- "cycles_per_s": 454593409,
- "rss_kb": 145812,
- "rss_anon_kb": 56124
- },
- "zoom_85": {
- "cpu_percent": 8.565,
- "voluntary_switches_per_s": 188.5,
- "instructions_per_s": 54894572,
- "cycles_per_s": 58216167,
- "rss_kb": 145828,
- "rss_anon_kb": 56140
- },
- "zoom_70": {
- "cpu_percent": 8.351,
- "voluntary_switches_per_s": 188.0,
- "instructions_per_s": 56760063,
- "cycles_per_s": 60215837,
- "rss_kb": 146564,
- "rss_anon_kb": 56876
- },
- "zoom_55": {
- "cpu_percent": 8.012,
- "voluntary_switches_per_s": 188.5,
- "instructions_per_s": 55215090,
- "cycles_per_s": 59452832,
- "rss_kb": 146896,
- "rss_anon_kb": 56888
- },
- "zoom_min_hold": {
- "cpu_percent": 7.645,
- "voluntary_switches_per_s": 189.0,
- "instructions_per_s": 38949801,
- "cycles_per_s": 52405745,
- "rss_kb": 146752,
- "rss_anon_kb": 57064
- }
- },
- "mixed": {
- "idle": {
- "cpu_percent": 0.003,
- "voluntary_switches_per_s": 0.6,
- "instructions_per_s": 2721,
- "cycles_per_s": 6196,
- "rss_kb": 138828,
- "rss_anon_kb": 49336
- },
- "spinner_clear": {
- "cpu_percent": 7.373,
- "voluntary_switches_per_s": 246.5,
- "instructions_per_s": 37240889,
- "cycles_per_s": 48339244,
- "rss_kb": 143552,
- "rss_anon_kb": 53932
- },
- "spinner_glass": {
- "cpu_percent": 8.483,
- "voluntary_switches_per_s": 238.7,
- "instructions_per_s": 51188779,
- "cycles_per_s": 58459734,
- "rss_kb": 143808,
- "rss_anon_kb": 53932
- },
- "damage_full": {
- "cpu_percent": 11.594,
- "voluntary_switches_per_s": 237.5,
- "instructions_per_s": 56133288,
- "cycles_per_s": 83749378,
- "rss_kb": 143552,
- "rss_anon_kb": 53932
- },
- "drag": {
- "cpu_percent": 7.167,
- "voluntary_switches_per_s": 192.2,
- "instructions_per_s": 60579030,
- "cycles_per_s": 56548650,
- "rss_kb": 143616,
- "rss_anon_kb": 53932
- },
- "resize": {
- "cpu_percent": 20.582,
- "voluntary_switches_per_s": 221.2,
- "instructions_per_s": 318341277,
- "cycles_per_s": 179762259,
- "rss_kb": 143616,
- "rss_anon_kb": 53932
- },
- "fullscreen": {
- "cpu_percent": 38.306,
- "voluntary_switches_per_s": 139.2,
- "instructions_per_s": 40271121,
- "cycles_per_s": 296338592,
- "rss_kb": 148064,
- "rss_anon_kb": 58380
- },
- "zoom_85": {
- "cpu_percent": 8.818,
- "voluntary_switches_per_s": 250.7,
- "instructions_per_s": 53348466,
- "cycles_per_s": 59465388,
- "rss_kb": 148080,
- "rss_anon_kb": 58396
- },
- "zoom_70": {
- "cpu_percent": 8.716,
- "voluntary_switches_per_s": 235.2,
- "instructions_per_s": 55144879,
- "cycles_per_s": 63662643,
- "rss_kb": 148664,
- "rss_anon_kb": 58980
- },
- "zoom_55": {
- "cpu_percent": 8.558,
- "voluntary_switches_per_s": 227.7,
- "instructions_per_s": 54832526,
- "cycles_per_s": 57084681,
- "rss_kb": 148672,
- "rss_anon_kb": 58988
- },
- "zoom_min_hold": {
- "cpu_percent": 7.038,
- "voluntary_switches_per_s": 244.5,
- "instructions_per_s": 42730843,
- "cycles_per_s": 50814509,
- "rss_kb": 148672,
- "rss_anon_kb": 58988
- }
- },
- "mixed_noglass": {
- "idle": {
- "cpu_percent": 0.003,
- "voluntary_switches_per_s": 0.6,
- "instructions_per_s": 151,
- "cycles_per_s": 2523,
- "rss_kb": 137992,
- "rss_anon_kb": 48820
- },
- "spinner_clear": {
- "cpu_percent": 6.604,
- "voluntary_switches_per_s": 249.0,
- "instructions_per_s": 36408196,
- "cycles_per_s": 44784244,
- "rss_kb": 142584,
- "rss_anon_kb": 53284
- },
- "spinner_glass": {
- "cpu_percent": 7.607,
- "voluntary_switches_per_s": 244.5,
- "instructions_per_s": 38265168,
- "cycles_per_s": 43690095,
- "rss_kb": 142584,
- "rss_anon_kb": 53284
- },
- "damage_full": {
- "cpu_percent": 10.69,
- "voluntary_switches_per_s": 242.7,
- "instructions_per_s": 41544397,
- "cycles_per_s": 73574975,
- "rss_kb": 142584,
- "rss_anon_kb": 53284
- },
- "drag": {
- "cpu_percent": 4.146,
- "voluntary_switches_per_s": 201.3,
- "instructions_per_s": 39409295,
- "cycles_per_s": 38696627,
- "rss_kb": 142648,
- "rss_anon_kb": 53284
- },
- "resize": {
- "cpu_percent": 15.011,
- "voluntary_switches_per_s": 204.0,
- "instructions_per_s": 283028190,
- "cycles_per_s": 160896608,
- "rss_kb": 142648,
- "rss_anon_kb": 53284
- },
- "fullscreen": {
- "cpu_percent": 36.956,
- "voluntary_switches_per_s": 153.5,
- "instructions_per_s": 39091625,
- "cycles_per_s": 378828451,
- "rss_kb": 147664,
- "rss_anon_kb": 58300
- },
- "zoom_85": {
- "cpu_percent": 7.198,
- "voluntary_switches_per_s": 245.5,
- "instructions_per_s": 39188642,
- "cycles_per_s": 48788328,
- "rss_kb": 147664,
- "rss_anon_kb": 58300
- },
- "zoom_70": {
- "cpu_percent": 7.798,
- "voluntary_switches_per_s": 243.0,
- "instructions_per_s": 38869242,
- "cycles_per_s": 50923302,
- "rss_kb": 148020,
- "rss_anon_kb": 58656
- },
- "zoom_55": {
- "cpu_percent": 7.703,
- "voluntary_switches_per_s": 247.7,
- "instructions_per_s": 39093145,
- "cycles_per_s": 51471125,
- "rss_kb": 148024,
- "rss_anon_kb": 58660
- },
- "zoom_min_hold": {
- "cpu_percent": 8.334,
- "voluntary_switches_per_s": 244.0,
- "instructions_per_s": 39798674,
- "cycles_per_s": 54245647,
- "rss_kb": 148024,
- "rss_anon_kb": 58660
- }
- }
- },
- "stats": {
- "scale1": {
- "idle": {
- "output_commits": 0,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0,
- "projection_cpu_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 243,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.4262172263374486,
- "projection_cpu_avg_ms": 0.02837445267489712,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.2159532181069959,
- "gpu_elapsed_avg_ms": 0.21268088888888886
- },
- "spinner_glass": {
- "output_commits": 240,
- "glass_reblurs": 240,
- "cpu_frame_avg_ms": 0.6086336166666667,
- "projection_cpu_avg_ms": 0.028915275,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.38476493333333334,
- "gpu_elapsed_avg_ms": 0.4748086375
- },
- "damage_full": {
- "output_commits": 240,
- "glass_reblurs": 240,
- "cpu_frame_avg_ms": 0.6496991541666667,
- "projection_cpu_avg_ms": 0.03037595833333333,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.432763025,
- "gpu_elapsed_avg_ms": 0.6133543916666667
- },
- "drag": {
- "output_commits": 242,
- "glass_reblurs": 244,
- "cpu_frame_avg_ms": 0.7032582962962963,
- "projection_cpu_avg_ms": 0.03778234979423868,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.45974870781893,
- "gpu_elapsed_avg_ms": 0.683997341563786
- },
- "resize": {
- "output_commits": 238,
- "glass_reblurs": 304,
- "cpu_frame_avg_ms": 0.7443755588235293,
- "projection_cpu_avg_ms": 0.039691378151260504,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.5263870252100841,
- "gpu_elapsed_avg_ms": 0.8191005630252101
- },
- "fullscreen": {
- "output_commits": 232,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.4108612435897436,
- "projection_cpu_avg_ms": 0.025500850427350424,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.2637363418803419,
- "gpu_elapsed_avg_ms": 0.6463695128205129
- },
- "zoom_85": {
- "output_commits": 240,
- "glass_reblurs": 252,
- "cpu_frame_avg_ms": 0.6266758874999999,
- "projection_cpu_avg_ms": 0.031191908333333334,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.40390077500000005,
- "gpu_elapsed_avg_ms": 0.5105325833333333
- },
- "zoom_70": {
- "output_commits": 240,
- "glass_reblurs": 253,
- "cpu_frame_avg_ms": 0.6868610708333333,
- "projection_cpu_avg_ms": 0.03371355833333334,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.4358765833333333,
- "gpu_elapsed_avg_ms": 0.5179557541666666
- },
- "zoom_55": {
- "output_commits": 240,
- "glass_reblurs": 253,
- "cpu_frame_avg_ms": 0.6207503625,
- "projection_cpu_avg_ms": 0.0308798375,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.39628588333333337,
- "gpu_elapsed_avg_ms": 0.4724231625
- },
- "zoom_min_hold": {
- "output_commits": 243,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.4756474279835391,
- "projection_cpu_avg_ms": 0.028374189300411523,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.24606253497942385,
- "gpu_elapsed_avg_ms": 0.23475008230452676
- }
- },
- "scale1.5": {
- "idle": {
- "output_commits": 0,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0,
- "projection_cpu_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 242,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.47317618181818183,
- "projection_cpu_avg_ms": 0.03457638016528926,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.23669712396694217,
- "gpu_elapsed_avg_ms": 0.20860087603305782
- },
- "spinner_glass": {
- "output_commits": 240,
- "glass_reblurs": 240,
- "cpu_frame_avg_ms": 0.6483671333333333,
- "projection_cpu_avg_ms": 0.03339382916666667,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.4216437291666667,
- "gpu_elapsed_avg_ms": 0.5702072375
- },
- "damage_full": {
- "output_commits": 238,
- "glass_reblurs": 238,
- "cpu_frame_avg_ms": 0.8032571050420169,
- "projection_cpu_avg_ms": 0.03848551680672269,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.5421409915966386,
- "gpu_elapsed_avg_ms": 0.7962366764705882
- },
- "drag": {
- "output_commits": 240,
- "glass_reblurs": 243,
- "cpu_frame_avg_ms": 0.8459555477178423,
- "projection_cpu_avg_ms": 0.050982962655601656,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.550808336099585,
- "gpu_elapsed_avg_ms": 0.9601778589211618
- },
- "resize": {
- "output_commits": 239,
- "glass_reblurs": 308,
- "cpu_frame_avg_ms": 0.7441296569037658,
- "projection_cpu_avg_ms": 0.04149028870292887,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.5334619539748954,
- "gpu_elapsed_avg_ms": 1.0279637280334728
- },
- "fullscreen": {
- "output_commits": 229,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.3966022532751092,
- "projection_cpu_avg_ms": 0.02572650218340611,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.2589999519650655,
- "gpu_elapsed_avg_ms": 0.965484192139738
- },
- "zoom_85": {
- "output_commits": 239,
- "glass_reblurs": 252,
- "cpu_frame_avg_ms": 0.7066271422594141,
- "projection_cpu_avg_ms": 0.03708236820083682,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.45728381171548116,
- "gpu_elapsed_avg_ms": 0.5967422677824268
- },
- "zoom_70": {
- "output_commits": 240,
- "glass_reblurs": 252,
- "cpu_frame_avg_ms": 0.6610032208333333,
- "projection_cpu_avg_ms": 0.03225682916666667,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.42885036249999997,
- "gpu_elapsed_avg_ms": 0.5726399541666667
- },
- "zoom_55": {
- "output_commits": 240,
- "glass_reblurs": 253,
- "cpu_frame_avg_ms": 0.6418336125,
- "projection_cpu_avg_ms": 0.030834125,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.4175881666666667,
- "gpu_elapsed_avg_ms": 0.5411902791666666
- },
- "zoom_min_hold": {
- "output_commits": 243,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.4691670740740741,
- "projection_cpu_avg_ms": 0.029120197530864197,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.2466365185185185,
- "gpu_elapsed_avg_ms": 0.24085392592592592
- }
- },
- "mixed": {
- "idle": {
- "output_commits": 0,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0,
- "projection_cpu_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 245,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.24438129278350518,
- "projection_cpu_avg_ms": 0.019705938144329894,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.0956998,
- "gpu_elapsed_avg_ms": 0.09562109484536083
- },
- "spinner_glass": {
- "output_commits": 242,
- "glass_reblurs": 242,
- "cpu_frame_avg_ms": 0.3080482614107884,
- "projection_cpu_avg_ms": 0.01975704979253112,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.16183823858921162,
- "gpu_elapsed_avg_ms": 0.2111405145228216
- },
- "damage_full": {
- "output_commits": 244,
- "glass_reblurs": 244,
- "cpu_frame_avg_ms": 0.28589054545454545,
- "projection_cpu_avg_ms": 0.016808712809917355,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.15813854338842973,
- "gpu_elapsed_avg_ms": 0.2278605061983471
- },
- "drag": {
- "output_commits": 489,
- "glass_reblurs": 410,
- "cpu_frame_avg_ms": 0.38850619144602855,
- "projection_cpu_avg_ms": 0.027413837067209776,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.23992022199592666,
- "gpu_elapsed_avg_ms": 0.3558089287169042
- },
- "resize": {
- "output_commits": 481,
- "glass_reblurs": 665,
- "cpu_frame_avg_ms": 0.4765827297297297,
- "projection_cpu_avg_ms": 0.02536403742203742,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.33971207068607073,
- "gpu_elapsed_avg_ms": 0.5470156237006237
- },
- "fullscreen": {
- "output_commits": 237,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.20523770563674323,
- "projection_cpu_avg_ms": 0.01708555114822547,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.0968478267223382,
- "gpu_elapsed_avg_ms": 0.2425071878914405
- },
- "zoom_85": {
- "output_commits": 256,
- "glass_reblurs": 269,
- "cpu_frame_avg_ms": 0.2962985217391304,
- "projection_cpu_avg_ms": 0.0180619917184265,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.15739289648033125,
- "gpu_elapsed_avg_ms": 0.19351828985507244
- },
- "zoom_70": {
- "output_commits": 242,
- "glass_reblurs": 251,
- "cpu_frame_avg_ms": 0.3435140560165975,
- "projection_cpu_avg_ms": 0.02164338174273859,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.1826542510373444,
- "gpu_elapsed_avg_ms": 0.21171052697095435
- },
- "zoom_55": {
- "output_commits": 242,
- "glass_reblurs": 255,
- "cpu_frame_avg_ms": 0.31950262732919255,
- "projection_cpu_avg_ms": 0.019389120082815733,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.17430986956521738,
- "gpu_elapsed_avg_ms": 0.20823402070393376
- },
- "zoom_min_hold": {
- "output_commits": 255,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.2592399423868313,
- "projection_cpu_avg_ms": 0.018472421810699587,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.11192118106995885,
- "gpu_elapsed_avg_ms": 0.1161256255144033
- }
- },
- "mixed_noglass": {
- "idle": {
- "output_commits": 0,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0,
- "projection_cpu_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 243,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.3200681014492754,
- "projection_cpu_avg_ms": 0.026450687370600415,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.11934977846790891,
- "gpu_elapsed_avg_ms": 0.122526
- },
- "spinner_glass": {
- "output_commits": 243,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.31206686542443063,
- "projection_cpu_avg_ms": 0.024740848861283644,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.1190941801242236,
- "gpu_elapsed_avg_ms": 0.1210428612836439
- },
- "damage_full": {
- "output_commits": 243,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.3149756169772257,
- "projection_cpu_avg_ms": 0.02466790890269151,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.12748577639751552,
- "gpu_elapsed_avg_ms": 0.15376313250517598
- },
- "drag": {
- "output_commits": 488,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.44561467959183676,
- "projection_cpu_avg_ms": 0.040719932653061224,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.2074553387755102,
- "gpu_elapsed_avg_ms": 0.28233202249488754
- },
- "resize": {
- "output_commits": 482,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.3674521950207469,
- "projection_cpu_avg_ms": 0.02757775726141079,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.23615467219917013,
- "gpu_elapsed_avg_ms": 0.32484970270270275
- },
- "fullscreen": {
- "output_commits": 122,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.2409555230125523,
- "projection_cpu_avg_ms": 0.022101828451882844,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.07092375941422595,
- "gpu_elapsed_avg_ms": 0.16294510041841004
- },
- "zoom_85": {
- "output_commits": 255,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.3122959481327801,
- "projection_cpu_avg_ms": 0.02372412863070539,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.12463009128630706,
- "gpu_elapsed_avg_ms": 0.11860946473029046
- },
- "zoom_70": {
- "output_commits": 242,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.3199588861283644,
- "projection_cpu_avg_ms": 0.02583757971014493,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.12196528364389234,
- "gpu_elapsed_avg_ms": 0.12159623809523809
- },
- "zoom_55": {
- "output_commits": 243,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.3036328367768595,
- "projection_cpu_avg_ms": 0.024109043388429754,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.11742762396694215,
- "gpu_elapsed_avg_ms": 0.11527309710743802
- },
- "zoom_min_hold": {
- "output_commits": 253,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.3211599214876033,
- "projection_cpu_avg_ms": 0.02371223347107438,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.12546426859504134,
- "gpu_elapsed_avg_ms": 0.12496228157349897
- }
- }
- }
- },
- "s6-b": {
- "meta": {
- "commit": "07806c3",
- "dirty": true,
- "renderer": "gles2",
- "kernel": "7.2.9-zen1-1-zen",
- "cpu": "12th Gen Intel(R) Core(TM) i9-12900H",
- "pinned_cpus": [
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9
- ],
- "render_device": "/dev/dri/renderD128",
- "seconds": 4.0,
- "power": {
- "ac_online": true,
- "battery": "Not charging",
- "platform_profile": "performance",
- "governor": "schedutil",
- "epp": "performance",
- "no_turbo": "0"
- },
- "date": "2026-10-12 19:36:02"
- },
- "clean": {
- "scale1": {
- "idle": {
- "cpu_percent": 0.002,
- "voluntary_switches_per_s": 0.4,
- "instructions_per_s": 143,
- "cycles_per_s": 2690,
- "rss_kb": 134420,
- "rss_anon_kb": 44872
- },
- "spinner_clear": {
- "cpu_percent": 7.414,
- "voluntary_switches_per_s": 189.5,
- "instructions_per_s": 32701280,
- "cycles_per_s": 43134031,
- "rss_kb": 135448,
- "rss_anon_kb": 45512
- },
- "spinner_glass": {
- "cpu_percent": 8.435,
- "voluntary_switches_per_s": 188.0,
- "instructions_per_s": 52712125,
- "cycles_per_s": 53708956,
- "rss_kb": 135192,
- "rss_anon_kb": 45512
- },
- "damage_full": {
- "cpu_percent": 11.77,
- "voluntary_switches_per_s": 187.0,
- "instructions_per_s": 56758312,
- "cycles_per_s": 81289036,
- "rss_kb": 135192,
- "rss_anon_kb": 45512
- },
- "drag": {
- "cpu_percent": 7.832,
- "voluntary_switches_per_s": 161.5,
- "instructions_per_s": 45362887,
- "cycles_per_s": 46260292,
- "rss_kb": 135256,
- "rss_anon_kb": 45512
- },
- "resize": {
- "cpu_percent": 16.232,
- "voluntary_switches_per_s": 226.0,
- "instructions_per_s": 163246360,
- "cycles_per_s": 117786871,
- "rss_kb": 135380,
- "rss_anon_kb": 45636
- },
- "fullscreen": {
- "cpu_percent": 43.2,
- "voluntary_switches_per_s": 154.5,
- "instructions_per_s": 47137043,
- "cycles_per_s": 310752934,
- "rss_kb": 139080,
- "rss_anon_kb": 49336
- },
- "zoom_85": {
- "cpu_percent": 8.706,
- "voluntary_switches_per_s": 188.0,
- "instructions_per_s": 52594740,
- "cycles_per_s": 54190371,
- "rss_kb": 139096,
- "rss_anon_kb": 49352
- },
- "zoom_70": {
- "cpu_percent": 8.568,
- "voluntary_switches_per_s": 187.7,
- "instructions_per_s": 53709570,
- "cycles_per_s": 54603548,
- "rss_kb": 139344,
- "rss_anon_kb": 49600
- },
- "zoom_55": {
- "cpu_percent": 8.623,
- "voluntary_switches_per_s": 188.2,
- "instructions_per_s": 52822708,
- "cycles_per_s": 54231003,
- "rss_kb": 139416,
- "rss_anon_kb": 49608
- },
- "zoom_min_hold": {
- "cpu_percent": 8.213,
- "voluntary_switches_per_s": 189.0,
- "instructions_per_s": 37363234,
- "cycles_per_s": 45798843,
- "rss_kb": 139684,
- "rss_anon_kb": 49940
- }
- },
- "scale1.5": {
- "idle": {
- "cpu_percent": 0.003,
- "voluntary_switches_per_s": 0.4,
- "instructions_per_s": 143,
- "cycles_per_s": 1675,
- "rss_kb": 138276,
- "rss_anon_kb": 48520
- },
- "spinner_clear": {
- "cpu_percent": 7.711,
- "voluntary_switches_per_s": 189.7,
- "instructions_per_s": 32747903,
- "cycles_per_s": 42441095,
- "rss_kb": 139080,
- "rss_anon_kb": 49188
- },
- "spinner_glass": {
- "cpu_percent": 8.775,
- "voluntary_switches_per_s": 187.2,
- "instructions_per_s": 55618327,
- "cycles_per_s": 54225728,
- "rss_kb": 139080,
- "rss_anon_kb": 49188
- },
- "damage_full": {
- "cpu_percent": 12.175,
- "voluntary_switches_per_s": 186.2,
- "instructions_per_s": 62767284,
- "cycles_per_s": 77914154,
- "rss_kb": 139092,
- "rss_anon_kb": 49200
- },
- "drag": {
- "cpu_percent": 7.815,
- "voluntary_switches_per_s": 164.1,
- "instructions_per_s": 47138934,
- "cycles_per_s": 47058299,
- "rss_kb": 139328,
- "rss_anon_kb": 49372
- },
- "resize": {
- "cpu_percent": 19.558,
- "voluntary_switches_per_s": 219.0,
- "instructions_per_s": 289506665,
- "cycles_per_s": 159041337,
- "rss_kb": 139376,
- "rss_anon_kb": 49420
- },
- "fullscreen": {
- "cpu_percent": 39.374,
- "voluntary_switches_per_s": 105.5,
- "instructions_per_s": 45087418,
- "cycles_per_s": 288994448,
- "rss_kb": 147752,
- "rss_anon_kb": 57796
- },
- "zoom_85": {
- "cpu_percent": 8.717,
- "voluntary_switches_per_s": 191.7,
- "instructions_per_s": 55071868,
- "cycles_per_s": 53489128,
- "rss_kb": 147768,
- "rss_anon_kb": 57812
- },
- "zoom_70": {
- "cpu_percent": 8.307,
- "voluntary_switches_per_s": 187.0,
- "instructions_per_s": 56279924,
- "cycles_per_s": 52354325,
- "rss_kb": 147816,
- "rss_anon_kb": 57860
- },
- "zoom_55": {
- "cpu_percent": 8.526,
- "voluntary_switches_per_s": 187.7,
- "instructions_per_s": 54913476,
- "cycles_per_s": 54809620,
- "rss_kb": 147828,
- "rss_anon_kb": 57872
- },
- "zoom_min_hold": {
- "cpu_percent": 7.817,
- "voluntary_switches_per_s": 189.2,
- "instructions_per_s": 38870894,
- "cycles_per_s": 44909454,
- "rss_kb": 148256,
- "rss_anon_kb": 58300
- }
- },
- "mixed": {
- "idle": {
- "cpu_percent": 0.003,
- "voluntary_switches_per_s": 0.6,
- "instructions_per_s": 151,
- "cycles_per_s": 1789,
- "rss_kb": 138356,
- "rss_anon_kb": 48748
- },
- "spinner_clear": {
- "cpu_percent": 8.714,
- "voluntary_switches_per_s": 242.5,
- "instructions_per_s": 37000364,
- "cycles_per_s": 49099849,
- "rss_kb": 143248,
- "rss_anon_kb": 53448
- },
- "spinner_glass": {
- "cpu_percent": 8.748,
- "voluntary_switches_per_s": 240.2,
- "instructions_per_s": 51183952,
- "cycles_per_s": 57305679,
- "rss_kb": 143248,
- "rss_anon_kb": 53448
- },
- "damage_full": {
- "cpu_percent": 12.433,
- "voluntary_switches_per_s": 246.7,
- "instructions_per_s": 55746967,
- "cycles_per_s": 79060503,
- "rss_kb": 143248,
- "rss_anon_kb": 53448
- },
- "drag": {
- "cpu_percent": 8.797,
- "voluntary_switches_per_s": 176.9,
- "instructions_per_s": 59288524,
- "cycles_per_s": 56577402,
- "rss_kb": 143312,
- "rss_anon_kb": 53448
- },
- "resize": {
- "cpu_percent": 20.065,
- "voluntary_switches_per_s": 208.5,
- "instructions_per_s": 318211207,
- "cycles_per_s": 177918942,
- "rss_kb": 143312,
- "rss_anon_kb": 53448
- },
- "fullscreen": {
- "cpu_percent": 18.884,
- "voluntary_switches_per_s": 169.5,
- "instructions_per_s": 24741354,
- "cycles_per_s": 164477464,
- "rss_kb": 147776,
- "rss_anon_kb": 57912
- },
- "zoom_85": {
- "cpu_percent": 9.439,
- "voluntary_switches_per_s": 250.7,
- "instructions_per_s": 53326158,
- "cycles_per_s": 60299778,
- "rss_kb": 147792,
- "rss_anon_kb": 57928
- },
- "zoom_70": {
- "cpu_percent": 8.881,
- "voluntary_switches_per_s": 250.5,
- "instructions_per_s": 55321401,
- "cycles_per_s": 57887439,
- "rss_kb": 148152,
- "rss_anon_kb": 58288
- },
- "zoom_55": {
- "cpu_percent": 9.272,
- "voluntary_switches_per_s": 230.0,
- "instructions_per_s": 54816212,
- "cycles_per_s": 58373599,
- "rss_kb": 148160,
- "rss_anon_kb": 58296
- },
- "zoom_min_hold": {
- "cpu_percent": 8.673,
- "voluntary_switches_per_s": 242.5,
- "instructions_per_s": 42625049,
- "cycles_per_s": 52428727,
- "rss_kb": 148160,
- "rss_anon_kb": 58296
- }
- },
- "mixed_noglass": {
- "idle": {
- "cpu_percent": 0.004,
- "voluntary_switches_per_s": 0.6,
- "instructions_per_s": 151,
- "cycles_per_s": 2353,
- "rss_kb": 137380,
- "rss_anon_kb": 48080
- },
- "spinner_clear": {
- "cpu_percent": 8.31,
- "voluntary_switches_per_s": 241.7,
- "instructions_per_s": 36068851,
- "cycles_per_s": 47261541,
- "rss_kb": 141972,
- "rss_anon_kb": 52544
- },
- "spinner_glass": {
- "cpu_percent": 8.41,
- "voluntary_switches_per_s": 242.2,
- "instructions_per_s": 37988428,
- "cycles_per_s": 47369480,
- "rss_kb": 141972,
- "rss_anon_kb": 52544
- },
- "damage_full": {
- "cpu_percent": 12.425,
- "voluntary_switches_per_s": 236.0,
- "instructions_per_s": 41155187,
- "cycles_per_s": 68464680,
- "rss_kb": 141972,
- "rss_anon_kb": 52544
- },
- "drag": {
- "cpu_percent": 7.923,
- "voluntary_switches_per_s": 188.4,
- "instructions_per_s": 38609351,
- "cycles_per_s": 43202823,
- "rss_kb": 142036,
- "rss_anon_kb": 52544
- },
- "resize": {
- "cpu_percent": 18.519,
- "voluntary_switches_per_s": 163.7,
- "instructions_per_s": 282891795,
- "cycles_per_s": 156471746,
- "rss_kb": 142036,
- "rss_anon_kb": 52544
- },
- "fullscreen": {
- "cpu_percent": 40.098,
- "voluntary_switches_per_s": 144.0,
- "instructions_per_s": 37842309,
- "cycles_per_s": 284086281,
- "rss_kb": 146936,
- "rss_anon_kb": 57444
- },
- "zoom_85": {
- "cpu_percent": 8.566,
- "voluntary_switches_per_s": 242.7,
- "instructions_per_s": 38802232,
- "cycles_per_s": 48445566,
- "rss_kb": 146936,
- "rss_anon_kb": 57444
- },
- "zoom_70": {
- "cpu_percent": 8.584,
- "voluntary_switches_per_s": 243.7,
- "instructions_per_s": 38645188,
- "cycles_per_s": 49061728,
- "rss_kb": 147328,
- "rss_anon_kb": 57836
- },
- "zoom_55": {
- "cpu_percent": 8.36,
- "voluntary_switches_per_s": 250.2,
- "instructions_per_s": 39399135,
- "cycles_per_s": 48897455,
- "rss_kb": 147328,
- "rss_anon_kb": 57836
- },
- "zoom_min_hold": {
- "cpu_percent": 8.291,
- "voluntary_switches_per_s": 241.7,
- "instructions_per_s": 39687261,
- "cycles_per_s": 48606525,
- "rss_kb": 147328,
- "rss_anon_kb": 57836
- }
- }
- },
- "stats": {
- "scale1": {
- "idle": {
- "output_commits": 0,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0,
- "projection_cpu_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 242,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.5027754338842975,
- "projection_cpu_avg_ms": 0.03562661570247934,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.24532261157024796,
- "gpu_elapsed_avg_ms": 0.22638234710743801
- },
- "spinner_glass": {
- "output_commits": 239,
- "glass_reblurs": 239,
- "cpu_frame_avg_ms": 0.6738479958158996,
- "projection_cpu_avg_ms": 0.031284464435146445,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.4303470753138075,
- "gpu_elapsed_avg_ms": 0.5369782552301255
- },
- "damage_full": {
- "output_commits": 238,
- "glass_reblurs": 238,
- "cpu_frame_avg_ms": 0.7600568697478991,
- "projection_cpu_avg_ms": 0.036373453781512605,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.49042428991596637,
- "gpu_elapsed_avg_ms": 0.6338243991596638
- },
- "drag": {
- "output_commits": 236,
- "glass_reblurs": 238,
- "cpu_frame_avg_ms": 1.1288603924050633,
- "projection_cpu_avg_ms": 0.060413,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.7212137974683545,
- "gpu_elapsed_avg_ms": 0.9460266610169491
- },
- "resize": {
- "output_commits": 238,
- "glass_reblurs": 305,
- "cpu_frame_avg_ms": 0.7361332100840337,
- "projection_cpu_avg_ms": 0.04060121008403361,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.5253523151260504,
- "gpu_elapsed_avg_ms": 0.8017894663865547
- },
- "fullscreen": {
- "output_commits": 118,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.3456702658227848,
- "projection_cpu_avg_ms": 0.024133962025316456,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.1662307299578059,
- "gpu_elapsed_avg_ms": 0.34403700843881857
- },
- "zoom_85": {
- "output_commits": 240,
- "glass_reblurs": 254,
- "cpu_frame_avg_ms": 0.6447240541666667,
- "projection_cpu_avg_ms": 0.0288671125,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.41315240833333333,
- "gpu_elapsed_avg_ms": 0.514617
- },
- "zoom_70": {
- "output_commits": 240,
- "glass_reblurs": 253,
- "cpu_frame_avg_ms": 0.6830863375,
- "projection_cpu_avg_ms": 0.033005720833333335,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.4359478541666667,
- "gpu_elapsed_avg_ms": 0.5244826625
- },
- "zoom_55": {
- "output_commits": 239,
- "glass_reblurs": 252,
- "cpu_frame_avg_ms": 0.6627937071129708,
- "projection_cpu_avg_ms": 0.030929560669456065,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.4236063933054393,
- "gpu_elapsed_avg_ms": 0.5018359832635984
- },
- "zoom_min_hold": {
- "output_commits": 241,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.5490302821576762,
- "projection_cpu_avg_ms": 0.033774443983402486,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.27454665975103737,
- "gpu_elapsed_avg_ms": 0.27076522406639003
- }
- },
- "scale1.5": {
- "idle": {
- "output_commits": 0,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0,
- "projection_cpu_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 242,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.4451170661157025,
- "projection_cpu_avg_ms": 0.03165035950413223,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.21972471900826446,
- "gpu_elapsed_avg_ms": 0.19443871074380165
- },
- "spinner_glass": {
- "output_commits": 240,
- "glass_reblurs": 240,
- "cpu_frame_avg_ms": 0.641476575,
- "projection_cpu_avg_ms": 0.030453987499999998,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.4207081458333333,
- "gpu_elapsed_avg_ms": 0.5474902541666666
- },
- "damage_full": {
- "output_commits": 237,
- "glass_reblurs": 237,
- "cpu_frame_avg_ms": 0.8033795316455696,
- "projection_cpu_avg_ms": 0.03885929957805907,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.5333004219409283,
- "gpu_elapsed_avg_ms": 0.7428978185654009
- },
- "drag": {
- "output_commits": 237,
- "glass_reblurs": 239,
- "cpu_frame_avg_ms": 1.0562253949579832,
- "projection_cpu_avg_ms": 0.061333294117647055,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.6760372352941176,
- "gpu_elapsed_avg_ms": 1.0517697394957983
- },
- "resize": {
- "output_commits": 239,
- "glass_reblurs": 308,
- "cpu_frame_avg_ms": 0.7468573807531381,
- "projection_cpu_avg_ms": 0.04233284937238494,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.5475145020920501,
- "gpu_elapsed_avg_ms": 0.9846455
- },
- "fullscreen": {
- "output_commits": 223,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.34292189237668164,
- "projection_cpu_avg_ms": 0.02321711659192825,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.226065067264574,
- "gpu_elapsed_avg_ms": 0.8700931704035874
- },
- "zoom_85": {
- "output_commits": 239,
- "glass_reblurs": 252,
- "cpu_frame_avg_ms": 0.7029160920502092,
- "projection_cpu_avg_ms": 0.035030326359832636,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.4463792217573222,
- "gpu_elapsed_avg_ms": 0.5644734979079499
- },
- "zoom_70": {
- "output_commits": 240,
- "glass_reblurs": 253,
- "cpu_frame_avg_ms": 0.6801445666666667,
- "projection_cpu_avg_ms": 0.031632975,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.44103122499999997,
- "gpu_elapsed_avg_ms": 0.5477152624999999
- },
- "zoom_55": {
- "output_commits": 240,
- "glass_reblurs": 252,
- "cpu_frame_avg_ms": 0.6469521666666667,
- "projection_cpu_avg_ms": 0.03177440833333333,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.4167242125,
- "gpu_elapsed_avg_ms": 0.5069242541666666
- },
- "zoom_min_hold": {
- "output_commits": 241,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.5191693734439834,
- "projection_cpu_avg_ms": 0.03189134439834025,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.26837740248962655,
- "gpu_elapsed_avg_ms": 0.25711875933609957
- }
- },
- "mixed": {
- "idle": {
- "output_commits": 0,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0,
- "projection_cpu_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 243,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.32475856521739127,
- "projection_cpu_avg_ms": 0.027103194616977227,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.1205614182194617,
- "gpu_elapsed_avg_ms": 0.11734849689440993
- },
- "spinner_glass": {
- "output_commits": 240,
- "glass_reblurs": 240,
- "cpu_frame_avg_ms": 0.37901949583333333,
- "projection_cpu_avg_ms": 0.02462431875,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.2016440625,
- "gpu_elapsed_avg_ms": 0.25335187708333334
- },
- "damage_full": {
- "output_commits": 240,
- "glass_reblurs": 240,
- "cpu_frame_avg_ms": 0.3886728958333333,
- "projection_cpu_avg_ms": 0.024676904166666666,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.21349732916666667,
- "gpu_elapsed_avg_ms": 0.28901497708333335
- },
- "drag": {
- "output_commits": 475,
- "glass_reblurs": 398,
- "cpu_frame_avg_ms": 0.7228251886792453,
- "projection_cpu_avg_ms": 0.0511077463312369,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.42847459958071277,
- "gpu_elapsed_avg_ms": 0.5527351844863733
- },
- "resize": {
- "output_commits": 480,
- "glass_reblurs": 661,
- "cpu_frame_avg_ms": 0.5513602520833333,
- "projection_cpu_avg_ms": 0.030981012500000002,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.39436049375000004,
- "gpu_elapsed_avg_ms": 0.5573472066805846
- },
- "fullscreen": {
- "output_commits": 119,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.1976849309623431,
- "projection_cpu_avg_ms": 0.017861085774058576,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.06676996652719665,
- "gpu_elapsed_avg_ms": 0.14122463807531382
- },
- "zoom_85": {
- "output_commits": 252,
- "glass_reblurs": 264,
- "cpu_frame_avg_ms": 0.40292578958333336,
- "projection_cpu_avg_ms": 0.025260220833333333,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.2204329416666667,
- "gpu_elapsed_avg_ms": 0.2716348350730689
- },
- "zoom_70": {
- "output_commits": 241,
- "glass_reblurs": 250,
- "cpu_frame_avg_ms": 0.3761943097713098,
- "projection_cpu_avg_ms": 0.02438758627858628,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.2056767338877339,
- "gpu_elapsed_avg_ms": 0.2538217027027027
- },
- "zoom_55": {
- "output_commits": 241,
- "glass_reblurs": 255,
- "cpu_frame_avg_ms": 0.39675971041666663,
- "projection_cpu_avg_ms": 0.025522410416666665,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.21071681458333333,
- "gpu_elapsed_avg_ms": 0.258630425
- },
- "zoom_min_hold": {
- "output_commits": 252,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.33978629752066114,
- "projection_cpu_avg_ms": 0.025734886363636363,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.14014907024793388,
- "gpu_elapsed_avg_ms": 0.1431139276859504
- }
- },
- "mixed_noglass": {
- "idle": {
- "output_commits": 0,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0,
- "projection_cpu_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 243,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.3162944492753623,
- "projection_cpu_avg_ms": 0.02494293788819876,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.11623506418219462,
- "gpu_elapsed_avg_ms": 0.11498070600414079
- },
- "spinner_glass": {
- "output_commits": 242,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.3193465041493776,
- "projection_cpu_avg_ms": 0.025010964730290457,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.12208753734439834,
- "gpu_elapsed_avg_ms": 0.12024897095435684
- },
- "damage_full": {
- "output_commits": 242,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.3324972111801242,
- "projection_cpu_avg_ms": 0.026126931677018635,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.13240413043478264,
- "gpu_elapsed_avg_ms": 0.1585014513457557
- },
- "drag": {
- "output_commits": 483,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.5256279670103092,
- "projection_cpu_avg_ms": 0.04694072577319587,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.24734007628865978,
- "gpu_elapsed_avg_ms": 0.33595756314699793
- },
- "resize": {
- "output_commits": 480,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.32385095,
- "projection_cpu_avg_ms": 0.02506273125,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.21011882916666666,
- "gpu_elapsed_avg_ms": 0.2683568791666667
- },
- "fullscreen": {
- "output_commits": 231,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.20912074788135593,
- "projection_cpu_avg_ms": 0.017530349576271188,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.09619942372881356,
- "gpu_elapsed_avg_ms": 0.21708454237288136
- },
- "zoom_85": {
- "output_commits": 254,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.3260125888429752,
- "projection_cpu_avg_ms": 0.024840493801652895,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.12873857644628098,
- "gpu_elapsed_avg_ms": 0.13005972933884297
- },
- "zoom_70": {
- "output_commits": 242,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.33434678674948237,
- "projection_cpu_avg_ms": 0.027141035196687372,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.12998325879917186,
- "gpu_elapsed_avg_ms": 0.13063459420289855
- },
- "zoom_55": {
- "output_commits": 243,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.3378066708074534,
- "projection_cpu_avg_ms": 0.02703637060041408,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.13087038302277434,
- "gpu_elapsed_avg_ms": 0.13135523395445134
- },
- "zoom_min_hold": {
- "output_commits": 253,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.33921239462809916,
- "projection_cpu_avg_ms": 0.025840712809917357,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.12981215702479337,
- "gpu_elapsed_avg_ms": 0.127420673553719
- }
- }
- }
- },
- "s5-b": {
- "meta": {
- "commit": "07806c3",
- "dirty": true,
- "renderer": "gles2",
- "kernel": "7.2.9-zen1-1-zen",
- "cpu": "12th Gen Intel(R) Core(TM) i9-12900H",
- "pinned_cpus": [
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9
- ],
- "render_device": "/dev/dri/renderD128",
- "seconds": 4.0,
- "power": {
- "ac_online": true,
- "battery": "Not charging",
- "platform_profile": "performance",
- "governor": "schedutil",
- "epp": "performance",
- "no_turbo": "0"
- },
- "date": "2026-10-12 19:43:41"
- },
- "clean": {
- "scale1": {
- "idle": {
- "cpu_percent": 0.002,
- "voluntary_switches_per_s": 0.4,
- "instructions_per_s": 143,
- "cycles_per_s": 2351,
- "rss_kb": 134844,
- "rss_anon_kb": 45204
- },
- "spinner_clear": {
- "cpu_percent": 7.783,
- "voluntary_switches_per_s": 189.7,
- "instructions_per_s": 32581004,
- "cycles_per_s": 42608366,
- "rss_kb": 135700,
- "rss_anon_kb": 45868
- },
- "spinner_glass": {
- "cpu_percent": 8.884,
- "voluntary_switches_per_s": 187.2,
- "instructions_per_s": 52741830,
- "cycles_per_s": 54082562,
- "rss_kb": 135700,
- "rss_anon_kb": 45868
- },
- "damage_full": {
- "cpu_percent": 12.316,
- "voluntary_switches_per_s": 186.7,
- "instructions_per_s": 56346672,
- "cycles_per_s": 74377786,
- "rss_kb": 135700,
- "rss_anon_kb": 45868
- },
- "drag": {
- "cpu_percent": 7.934,
- "voluntary_switches_per_s": 161.2,
- "instructions_per_s": 48408884,
- "cycles_per_s": 47889374,
- "rss_kb": 135764,
- "rss_anon_kb": 45868
- },
- "resize": {
- "cpu_percent": 17.615,
- "voluntary_switches_per_s": 232.0,
- "instructions_per_s": 183583230,
- "cycles_per_s": 126026856,
- "rss_kb": 135872,
- "rss_anon_kb": 45976
- },
- "fullscreen": {
- "cpu_percent": 39.548,
- "voluntary_switches_per_s": 133.0,
- "instructions_per_s": 44985366,
- "cycles_per_s": 289608100,
- "rss_kb": 139752,
- "rss_anon_kb": 49856
- },
- "zoom_85": {
- "cpu_percent": 9.01,
- "voluntary_switches_per_s": 187.5,
- "instructions_per_s": 52414721,
- "cycles_per_s": 54729459,
- "rss_kb": 139768,
- "rss_anon_kb": 49872
- },
- "zoom_70": {
- "cpu_percent": 8.228,
- "voluntary_switches_per_s": 187.2,
- "instructions_per_s": 53920449,
- "cycles_per_s": 52075231,
- "rss_kb": 139816,
- "rss_anon_kb": 49920
- },
- "zoom_55": {
- "cpu_percent": 8.471,
- "voluntary_switches_per_s": 188.0,
- "instructions_per_s": 52667232,
- "cycles_per_s": 53532299,
- "rss_kb": 139824,
- "rss_anon_kb": 49928
- },
- "zoom_min_hold": {
- "cpu_percent": 7.835,
- "voluntary_switches_per_s": 193.5,
- "instructions_per_s": 37341328,
- "cycles_per_s": 44019601,
- "rss_kb": 140164,
- "rss_anon_kb": 50268
- }
- },
- "scale1.5": {
- "idle": {
- "cpu_percent": 0.141,
- "voluntary_switches_per_s": 3.2,
- "instructions_per_s": 291452,
- "cycles_per_s": 254132,
- "rss_kb": 138536,
- "rss_anon_kb": 49052
- },
- "spinner_clear": {
- "cpu_percent": 7.771,
- "voluntary_switches_per_s": 189.7,
- "instructions_per_s": 32763955,
- "cycles_per_s": 42594047,
- "rss_kb": 139164,
- "rss_anon_kb": 49536
- },
- "spinner_glass": {
- "cpu_percent": 8.695,
- "voluntary_switches_per_s": 187.2,
- "instructions_per_s": 55539160,
- "cycles_per_s": 55797134,
- "rss_kb": 139364,
- "rss_anon_kb": 49736
- },
- "damage_full": {
- "cpu_percent": 12.694,
- "voluntary_switches_per_s": 186.0,
- "instructions_per_s": 63013597,
- "cycles_per_s": 78349156,
- "rss_kb": 139364,
- "rss_anon_kb": 49736
- },
- "drag": {
- "cpu_percent": 8.186,
- "voluntary_switches_per_s": 161.6,
- "instructions_per_s": 50176960,
- "cycles_per_s": 49453986,
- "rss_kb": 139428,
- "rss_anon_kb": 49736
- },
- "resize": {
- "cpu_percent": 19.577,
- "voluntary_switches_per_s": 229.2,
- "instructions_per_s": 311373244,
- "cycles_per_s": 170546414,
- "rss_kb": 140056,
- "rss_anon_kb": 50364
- },
- "fullscreen": {
- "cpu_percent": 34.407,
- "voluntary_switches_per_s": 122.2,
- "instructions_per_s": 47301030,
- "cycles_per_s": 307560119,
- "rss_kb": 147916,
- "rss_anon_kb": 58224
- },
- "zoom_85": {
- "cpu_percent": 8.631,
- "voluntary_switches_per_s": 187.7,
- "instructions_per_s": 54710820,
- "cycles_per_s": 54995794,
- "rss_kb": 147932,
- "rss_anon_kb": 58240
- },
- "zoom_70": {
- "cpu_percent": 8.97,
- "voluntary_switches_per_s": 187.0,
- "instructions_per_s": 56392004,
- "cycles_per_s": 55499992,
- "rss_kb": 147972,
- "rss_anon_kb": 58280
- },
- "zoom_55": {
- "cpu_percent": 8.677,
- "voluntary_switches_per_s": 188.0,
- "instructions_per_s": 54944161,
- "cycles_per_s": 54134070,
- "rss_kb": 147980,
- "rss_anon_kb": 58288
- },
- "zoom_min_hold": {
- "cpu_percent": 7.755,
- "voluntary_switches_per_s": 188.2,
- "instructions_per_s": 37469588,
- "cycles_per_s": 44146189,
- "rss_kb": 148412,
- "rss_anon_kb": 58720
- }
- },
- "mixed": {
- "idle": {
- "cpu_percent": 0.003,
- "voluntary_switches_per_s": 0.6,
- "instructions_per_s": 151,
- "cycles_per_s": 2008,
- "rss_kb": 138260,
- "rss_anon_kb": 48860
- },
- "spinner_clear": {
- "cpu_percent": 8.322,
- "voluntary_switches_per_s": 248.7,
- "instructions_per_s": 37311975,
- "cycles_per_s": 48504483,
- "rss_kb": 142992,
- "rss_anon_kb": 53452
- },
- "spinner_glass": {
- "cpu_percent": 9.125,
- "voluntary_switches_per_s": 245.5,
- "instructions_per_s": 50686334,
- "cycles_per_s": 58401535,
- "rss_kb": 142992,
- "rss_anon_kb": 53452
- },
- "damage_full": {
- "cpu_percent": 13.079,
- "voluntary_switches_per_s": 222.7,
- "instructions_per_s": 55428242,
- "cycles_per_s": 77172228,
- "rss_kb": 142992,
- "rss_anon_kb": 53452
- },
- "drag": {
- "cpu_percent": 9.476,
- "voluntary_switches_per_s": 176.1,
- "instructions_per_s": 60234020,
- "cycles_per_s": 58524159,
- "rss_kb": 143056,
- "rss_anon_kb": 53452
- },
- "resize": {
- "cpu_percent": 21.452,
- "voluntary_switches_per_s": 233.0,
- "instructions_per_s": 338175292,
- "cycles_per_s": 190110282,
- "rss_kb": 143056,
- "rss_anon_kb": 53452
- },
- "fullscreen": {
- "cpu_percent": 43.007,
- "voluntary_switches_per_s": 115.7,
- "instructions_per_s": 79176720,
- "cycles_per_s": 322997973,
- "rss_kb": 148040,
- "rss_anon_kb": 58436
- },
- "zoom_85": {
- "cpu_percent": 9.175,
- "voluntary_switches_per_s": 246.0,
- "instructions_per_s": 52824101,
- "cycles_per_s": 58861832,
- "rss_kb": 148040,
- "rss_anon_kb": 58436
- },
- "zoom_70": {
- "cpu_percent": 8.684,
- "voluntary_switches_per_s": 239.0,
- "instructions_per_s": 55038136,
- "cycles_per_s": 57825481,
- "rss_kb": 148092,
- "rss_anon_kb": 58488
- },
- "zoom_55": {
- "cpu_percent": 8.558,
- "voluntary_switches_per_s": 243.0,
- "instructions_per_s": 55046695,
- "cycles_per_s": 58311021,
- "rss_kb": 148100,
- "rss_anon_kb": 58496
- },
- "zoom_min_hold": {
- "cpu_percent": 8.139,
- "voluntary_switches_per_s": 242.7,
- "instructions_per_s": 41607969,
- "cycles_per_s": 49379250,
- "rss_kb": 148100,
- "rss_anon_kb": 58496
- }
- },
- "mixed_noglass": {
- "idle": {
- "cpu_percent": 0.002,
- "voluntary_switches_per_s": 0.4,
- "instructions_per_s": 151,
- "cycles_per_s": 1587,
- "rss_kb": 137476,
- "rss_anon_kb": 47980
- },
- "spinner_clear": {
- "cpu_percent": 7.933,
- "voluntary_switches_per_s": 243.2,
- "instructions_per_s": 35803533,
- "cycles_per_s": 46989382,
- "rss_kb": 142208,
- "rss_anon_kb": 52584
- },
- "spinner_glass": {
- "cpu_percent": 7.953,
- "voluntary_switches_per_s": 247.2,
- "instructions_per_s": 38071363,
- "cycles_per_s": 46847154,
- "rss_kb": 142208,
- "rss_anon_kb": 52584
- },
- "damage_full": {
- "cpu_percent": 11.435,
- "voluntary_switches_per_s": 240.2,
- "instructions_per_s": 40908220,
- "cycles_per_s": 68936867,
- "rss_kb": 142208,
- "rss_anon_kb": 52584
- },
- "drag": {
- "cpu_percent": 7.148,
- "voluntary_switches_per_s": 192.0,
- "instructions_per_s": 40241058,
- "cycles_per_s": 43935297,
- "rss_kb": 142272,
- "rss_anon_kb": 52584
- },
- "resize": {
- "cpu_percent": 19.048,
- "voluntary_switches_per_s": 193.0,
- "instructions_per_s": 303547062,
- "cycles_per_s": 164506206,
- "rss_kb": 142272,
- "rss_anon_kb": 52584
- },
- "fullscreen": {
- "cpu_percent": 19.496,
- "voluntary_switches_per_s": 178.2,
- "instructions_per_s": 29409252,
- "cycles_per_s": 169827546,
- "rss_kb": 146720,
- "rss_anon_kb": 57032
- },
- "zoom_85": {
- "cpu_percent": 8.032,
- "voluntary_switches_per_s": 245.5,
- "instructions_per_s": 38363631,
- "cycles_per_s": 48565878,
- "rss_kb": 146976,
- "rss_anon_kb": 57032
- },
- "zoom_70": {
- "cpu_percent": 8.479,
- "voluntary_switches_per_s": 244.5,
- "instructions_per_s": 38541010,
- "cycles_per_s": 48706822,
- "rss_kb": 147412,
- "rss_anon_kb": 57724
- },
- "zoom_55": {
- "cpu_percent": 7.941,
- "voluntary_switches_per_s": 244.0,
- "instructions_per_s": 38884661,
- "cycles_per_s": 47839539,
- "rss_kb": 147412,
- "rss_anon_kb": 57724
- },
- "zoom_min_hold": {
- "cpu_percent": 8.183,
- "voluntary_switches_per_s": 243.0,
- "instructions_per_s": 39111352,
- "cycles_per_s": 49795252,
- "rss_kb": 147412,
- "rss_anon_kb": 57724
- }
- }
- },
- "stats": {
- "scale1": {
- "idle": {
- "output_commits": 0,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0,
- "projection_cpu_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 242,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.4718257479338843,
- "projection_cpu_avg_ms": 0.03949895041322314,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.2230435826446281,
- "gpu_elapsed_avg_ms": 0.20344480991735536
- },
- "spinner_glass": {
- "output_commits": 239,
- "glass_reblurs": 239,
- "cpu_frame_avg_ms": 0.6682396443514644,
- "projection_cpu_avg_ms": 0.04007462761506276,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.4163003556485355,
- "gpu_elapsed_avg_ms": 0.5167087238493724
- },
- "damage_full": {
- "output_commits": 239,
- "glass_reblurs": 239,
- "cpu_frame_avg_ms": 0.7084305732217573,
- "projection_cpu_avg_ms": 0.04109290376569037,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.4494228661087866,
- "gpu_elapsed_avg_ms": 0.5964528953974896
- },
- "drag": {
- "output_commits": 235,
- "glass_reblurs": 239,
- "cpu_frame_avg_ms": 1.1261686144067797,
- "projection_cpu_avg_ms": 0.1165441186440678,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.6758209110169491,
- "gpu_elapsed_avg_ms": 0.901869283898305
- },
- "resize": {
- "output_commits": 235,
- "glass_reblurs": 302,
- "cpu_frame_avg_ms": 0.9523061191489361,
- "projection_cpu_avg_ms": 0.2370606255319149,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.5271911957446809,
- "gpu_elapsed_avg_ms": 0.8110053446808511
- },
- "fullscreen": {
- "output_commits": 119,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.3206877088607595,
- "projection_cpu_avg_ms": 0.025554767932489453,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.15328265400843882,
- "gpu_elapsed_avg_ms": 0.3322202573839662
- },
- "zoom_85": {
- "output_commits": 240,
- "glass_reblurs": 253,
- "cpu_frame_avg_ms": 0.6374082249999999,
- "projection_cpu_avg_ms": 0.03975564166666667,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.3953511041666667,
- "gpu_elapsed_avg_ms": 0.4945136875
- },
- "zoom_70": {
- "output_commits": 240,
- "glass_reblurs": 252,
- "cpu_frame_avg_ms": 0.6538220916666667,
- "projection_cpu_avg_ms": 0.037962075,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.4097533875,
- "gpu_elapsed_avg_ms": 0.5022228583333334
- },
- "zoom_55": {
- "output_commits": 239,
- "glass_reblurs": 252,
- "cpu_frame_avg_ms": 0.6972097531380753,
- "projection_cpu_avg_ms": 0.041712347280334724,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.42987902092050206,
- "gpu_elapsed_avg_ms": 0.5084026150627615
- },
- "zoom_min_hold": {
- "output_commits": 241,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.5453183817427385,
- "projection_cpu_avg_ms": 0.04250292946058091,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.2657776680497925,
- "gpu_elapsed_avg_ms": 0.25653159336099585
- }
- },
- "scale1.5": {
- "idle": {
- "output_commits": 1,
- "glass_reblurs": 1,
- "cpu_frame_avg_ms": 1.1506815,
- "projection_cpu_avg_ms": 0.0368195,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.363032,
- "gpu_elapsed_avg_ms": 0.7497655
- },
- "spinner_clear": {
- "output_commits": 242,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.45797253305785124,
- "projection_cpu_avg_ms": 0.03992035537190083,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.2179926652892562,
- "gpu_elapsed_avg_ms": 0.1955673388429752
- },
- "spinner_glass": {
- "output_commits": 239,
- "glass_reblurs": 239,
- "cpu_frame_avg_ms": 0.6692997364016736,
- "projection_cpu_avg_ms": 0.03934518410041841,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.43001585774058576,
- "gpu_elapsed_avg_ms": 0.55979469874477
- },
- "damage_full": {
- "output_commits": 238,
- "glass_reblurs": 238,
- "cpu_frame_avg_ms": 0.7686343991596638,
- "projection_cpu_avg_ms": 0.04367994117647059,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.507516231092437,
- "gpu_elapsed_avg_ms": 0.7334561302521009
- },
- "drag": {
- "output_commits": 234,
- "glass_reblurs": 238,
- "cpu_frame_avg_ms": 1.1694368042553192,
- "projection_cpu_avg_ms": 0.1276772510638298,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.6966903829787234,
- "gpu_elapsed_avg_ms": 1.0758342127659575
- },
- "resize": {
- "output_commits": 236,
- "glass_reblurs": 300,
- "cpu_frame_avg_ms": 0.9321069491525424,
- "projection_cpu_avg_ms": 0.2255046906779661,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.5225628305084745,
- "gpu_elapsed_avg_ms": 0.9782962923728813
- },
- "fullscreen": {
- "output_commits": 120,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.327812253164557,
- "projection_cpu_avg_ms": 0.026985556962025314,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.15850730379746836,
- "gpu_elapsed_avg_ms": 0.5088745738396624
- },
- "zoom_85": {
- "output_commits": 239,
- "glass_reblurs": 252,
- "cpu_frame_avg_ms": 0.7098632970711297,
- "projection_cpu_avg_ms": 0.041562309623430965,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.44506770292887027,
- "gpu_elapsed_avg_ms": 0.5633665062761506
- },
- "zoom_70": {
- "output_commits": 239,
- "glass_reblurs": 252,
- "cpu_frame_avg_ms": 0.7075415648535565,
- "projection_cpu_avg_ms": 0.04320457740585774,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.44582723849372385,
- "gpu_elapsed_avg_ms": 0.5438430794979079
- },
- "zoom_55": {
- "output_commits": 239,
- "glass_reblurs": 252,
- "cpu_frame_avg_ms": 0.661339610878661,
- "projection_cpu_avg_ms": 0.03991593723849372,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.4163370836820084,
- "gpu_elapsed_avg_ms": 0.5041734895397489
- },
- "zoom_min_hold": {
- "output_commits": 242,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.5224143057851239,
- "projection_cpu_avg_ms": 0.040417615702479336,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.25720453305785124,
- "gpu_elapsed_avg_ms": 0.2492534090909091
- }
- },
- "mixed": {
- "idle": {
- "output_commits": 0,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0,
- "projection_cpu_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 243,
- "glass_reblurs": 2,
- "cpu_frame_avg_ms": 0.34223190683229815,
- "projection_cpu_avg_ms": 0.034704952380952385,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.12114148033126294,
- "gpu_elapsed_avg_ms": 0.1232546149068323
- },
- "spinner_glass": {
- "output_commits": 240,
- "glass_reblurs": 240,
- "cpu_frame_avg_ms": 0.36824944374999996,
- "projection_cpu_avg_ms": 0.02962568125,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.19236110416666666,
- "gpu_elapsed_avg_ms": 0.24975257708333334
- },
- "damage_full": {
- "output_commits": 240,
- "glass_reblurs": 240,
- "cpu_frame_avg_ms": 0.39036623076923077,
- "projection_cpu_avg_ms": 0.03002182952182952,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.20912148232848232,
- "gpu_elapsed_avg_ms": 0.28580194178794177
- },
- "drag": {
- "output_commits": 478,
- "glass_reblurs": 403,
- "cpu_frame_avg_ms": 0.6913420166666667,
- "projection_cpu_avg_ms": 0.08087232916666666,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.38119641041666663,
- "gpu_elapsed_avg_ms": 0.5267842604166666
- },
- "resize": {
- "output_commits": 474,
- "glass_reblurs": 653,
- "cpu_frame_avg_ms": 0.5956821244725738,
- "projection_cpu_avg_ms": 0.12587728481012658,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.355180246835443,
- "gpu_elapsed_avg_ms": 0.4912878037974684
- },
- "fullscreen": {
- "output_commits": 442,
- "glass_reblurs": 442,
- "cpu_frame_avg_ms": 0.3483801018099547,
- "projection_cpu_avg_ms": 0.02221510407239819,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.24248043438914027,
- "gpu_elapsed_avg_ms": 0.49054038461538463
- },
- "zoom_85": {
- "output_commits": 252,
- "glass_reblurs": 264,
- "cpu_frame_avg_ms": 0.378357711018711,
- "projection_cpu_avg_ms": 0.029113856548856547,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.20025082120582122,
- "gpu_elapsed_avg_ms": 0.2544440997920998
- },
- "zoom_70": {
- "output_commits": 240,
- "glass_reblurs": 249,
- "cpu_frame_avg_ms": 0.38427594374999996,
- "projection_cpu_avg_ms": 0.02694409375,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.21299441041666667,
- "gpu_elapsed_avg_ms": 0.26929155208333333
- },
- "zoom_55": {
- "output_commits": 240,
- "glass_reblurs": 253,
- "cpu_frame_avg_ms": 0.37575326666666664,
- "projection_cpu_avg_ms": 0.029057452083333334,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.20360165625,
- "gpu_elapsed_avg_ms": 0.25554022916666663
- },
- "zoom_min_hold": {
- "output_commits": 250,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.343761398340249,
- "projection_cpu_avg_ms": 0.030736176348547715,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.13459403734439832,
- "gpu_elapsed_avg_ms": 0.13882813692946055
- }
- },
- "mixed_noglass": {
- "idle": {
- "output_commits": 0,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0,
- "projection_cpu_avg_ms": 0,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0,
- "gpu_elapsed_avg_ms": 0
- },
- "spinner_clear": {
- "output_commits": 243,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.28921288636363635,
- "projection_cpu_avg_ms": 0.026759010330578512,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.10365011363636363,
- "gpu_elapsed_avg_ms": 0.09677202892561983
- },
- "spinner_glass": {
- "output_commits": 244,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.3083396128364389,
- "projection_cpu_avg_ms": 0.028899985507246376,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.11205454658385093,
- "gpu_elapsed_avg_ms": 0.11045697722567288
- },
- "damage_full": {
- "output_commits": 243,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.3092466314699793,
- "projection_cpu_avg_ms": 0.028545956521739132,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.11780619875776398,
- "gpu_elapsed_avg_ms": 0.14151793995859213
- },
- "drag": {
- "output_commits": 482,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.49912269421487604,
- "projection_cpu_avg_ms": 0.07445066322314049,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.2112389070247934,
- "gpu_elapsed_avg_ms": 0.3002722417355372
- },
- "resize": {
- "output_commits": 480,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.3841743375,
- "projection_cpu_avg_ms": 0.10805001041666668,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.18849255208333335,
- "gpu_elapsed_avg_ms": 0.24619911458333335
- },
- "fullscreen": {
- "output_commits": 478,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.24192800416666668,
- "projection_cpu_avg_ms": 0.019146589583333335,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.1396608,
- "gpu_elapsed_avg_ms": 0.2371037125
- },
- "zoom_85": {
- "output_commits": 254,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.3415190518672199,
- "projection_cpu_avg_ms": 0.03275798132780083,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.12559265975103734,
- "gpu_elapsed_avg_ms": 0.12699029875518672
- },
- "zoom_70": {
- "output_commits": 243,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.3205200041407868,
- "projection_cpu_avg_ms": 0.02986333540372671,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.1201483685300207,
- "gpu_elapsed_avg_ms": 0.12021838716356106
- },
- "zoom_55": {
- "output_commits": 242,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.32088109128630704,
- "projection_cpu_avg_ms": 0.030230014522821577,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.12116221161825727,
- "gpu_elapsed_avg_ms": 0.12314771784232365
- },
- "zoom_min_hold": {
- "output_commits": 251,
- "glass_reblurs": 0,
- "cpu_frame_avg_ms": 0.2912512111801242,
- "projection_cpu_avg_ms": 0.025772590062111803,
- "glass_cpu_avg_ms": 0,
- "scene_commit_cpu_avg_ms": 0.10979878260869565,
- "gpu_elapsed_avg_ms": 0.10917290269151139
- }
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/docs/plans/scene-graph-stage6.md b/docs/plans/scene-graph-stage6.md
deleted file mode 100644
index 30b9bc7..0000000
--- a/docs/plans/scene-graph-stage6.md
+++ /dev/null
@@ -1,271 +0,0 @@
-# Scene graph plan, stage 6: one tree
-
-Status: **6a to 6e done (6a to 6d 2026-10-11, the cost gate 2026-10-12)**, and
-nothing committed. D1 to D4 taken as recommended. Stages 0 to 5 of
-[scene-graph.md](scene-graph.md) are done: the owned output pass is the only
-presenter and draws window shapes, shadows and glass from the typed graph. This
-stage removes the last mirror: the projection's **view tree**, a second copy of
-every window's scene nodes that no longer draws anything but still carried hit
-testing, damage and surface feedback. The source scene tree stays as the surface
-adapter (the master plan keeps replacing it for a later, separate decision).
-
-## Goal and exit
-
-The graph is the one description of the world: `resolve` reads the source tree,
-and the output pass, hit testing, damage and every per-surface protocol event
-come from the resolved items. No view nodes, no per-leaf `view_state` cache, no
-second lock on client buffers, no listeners moved between nodes.
-
-Exit:
-
-* Clients see the same protocol as today, per output: `wl_surface.enter/leave`,
- preferred buffer scale and transform, frame callbacks, presentation feedback,
- explicit-sync release points, for windows, subsurfaces, popups and Xwayland,
- at every camera zoom and across outputs of different scales.
-* Hit testing gives the same node and local coordinates as today at every zoom,
- including rounded corners, popups, the resize reach and peek through dimmed
- windows.
-* No frame shows stale pixels and idle makes no wakeups.
-* Cost at the stage gate (once, after the last sub-stage): `projection_cpu` and
- instructions per frame lower than stage 5, anonymous memory lower (no view
- nodes), nothing else higher.
-
-## What exists today
-
-Verified in the code on 2026-10-11 (`projection.c`, `scene_output.c`,
-`scene_data.zig`, `Output.zig`).
-
-* **Two trees.** `World` creates the projection over `world_tree` (the source,
- disabled so wlroots ignores it) and `world_view`. Every leaf gets a view node;
- `present` positions it, sets its buffer (marking the second client-buffer lock
- ignorable so shm uploads stay in place), opacity, transform, opaque region, and
- moves the client surface's `outputs_update`, `output_sample` and `frame_done`
- listeners onto it (`route_surface`). Other trees (background, desktop, taskbar,
- overlays, IME, lock) are ordinary enabled scene nodes outside the projection.
-* **What the view tree still does:**
- 1. *Hit testing.* `scene_data.hitTest` calls `wlr_scene_node_at` on the scene
- root, which reaches the view nodes (with `accepts()` declining points a
- window's shape cuts away) and maps back with `projection.source`;
- `mini_map.zig` does one more pick.
- 2. *Damage.* wlroots damages each output's ring when a view node moves, changes
- or gets a new buffer; the owned pass reads that ring. The graph already
- records the same changes as damage events (stage 5a), used by glass only.
- 3. *Surface feedback.* wlroots computes each view buffer's outputs and primary
- output from its visibility and emits `outputs_update`/`output_enter`/
- `output_leave`; `Output.sendFrameDone` walks the scene for frame callbacks;
- the pass emits `output_sample` on the view (release points, presentation).
- `wlr_scene_surface` turns these into the protocol.
- 4. *Transport.* The pass reads buffers, textures, single-pixel colours, wait
- points and opaque regions from the view nodes, which copy them from the
- source each sync.
-* **Cost** (stage 5 gate): `projection_cpu` is 0.03 to 0.24 ms a frame, most of
- it `present` writing views; each view is a `wlr_scene_buffer` plus a cache entry.
-
-## Design
-
-The pass already walks the graph per output. Each of the four jobs moves to it:
-
-* **Hit testing** walks the same items top to bottom (world items in paint order,
- layout nodes as today): the float edges, the window shape, then the source
- buffer's own `point_accepts_input` in source-local coordinates. Layout trees can
- keep `wlr_scene_node_at` (D1).
-* **Damage** for the world comes from the graph's damage events, mapped to each
- output's device pixels, added to its ring and commit damage, plus a frame
- request. Layout trees keep wlroots' damage.
-* **Feedback**: per output frame, the pass knows which surface items it drew and
- how much of each is visible. From that it keeps, per source buffer, the active
- outputs and a primary output (wlroots' rule, D3), and emits the scene buffer's
- own `outputs_update`/`output_enter`/`output_leave` and `frame_done`
- (`wlr_scene_buffer_send_frame_done`) on the *source* buffer, where
- `wlr_scene_surface` listens natively. `output_sample` moves to the source too.
- An item that is culled or off every output still needs its outputs cleared and
- no frame callbacks, as wlroots does for hidden nodes.
-* **Transport** reads the source buffer directly: textures are cached on it, the
- single-pixel colour and wait points are already there, and with one lock per
- client buffer the in-place upload rule needs no marking.
-
-## Decisions (D1 to D4 taken 2026-10-11, as recommended)
-
-* **D1. Scope.** (A) **Recommended**: the world only. Background, desktop,
- taskbar, overlays, IME and lock stay ordinary scene nodes with wlroots' own
- damage, feedback and picking; the graph keeps reading them as layout items.
- They are few, mostly compositor-owned, and have no camera. (B) Everything
- through the graph, ending wlroots' scene output bookkeeping entirely: more
- code and more risk for nodes that gain nothing from it.
-* **D2. Who sends the protocol.** (A) **Recommended**: emit wlroots' own scene
- buffer signals on the source buffers, so `wlr_scene_surface` keeps sending
- enter/leave, preferred scale and transform, frame callbacks and release points,
- as it does for every other compositor on wlroots. (B) Send the protocol
- ourselves: full control, but it duplicates what wlroots maintains and must
- track its fixes.
-* **D3. Primary output.** (A) **Recommended**: wlroots' rule (the output showing
- the largest visible area), so preferred scale and frame pacing do not change
- for any client. (B) The sharpest output the surface touches, which would make
- a window spanning a 1x and a 2x output render at 2x (sharper, dearer).
-* **D4. Migration safety.** (A) **Recommended**: build each replacement beside the
- view tree and compare in Debug builds (hit results, damage and active outputs
- against what wlroots computes on the views), then delete the views once all
- three agree. (B) Switch each job directly: faster, but a mismatch shows as a
- client bug rather than an assertion.
-* **D5. Per-surface dmabuf feedback** (not asked yet; (A) assumed unless the user
- says otherwise) (scanout tranches), absent in both presenters
- since stage 0: (A) **Recommended**: not in this stage; it is a feature, and the
- feedback paths built here make it a small follow-up. (B) Add it here.
-
-## Sub-stages
-
-Each leaves a working compositor with its own correctness gates; cost is judged
-once, after 6e.
-
-* **6a. Feedback from the graph, beside the views.** Per output and source buffer:
- active outputs and primary output from what the pass drew; emit on the source
- buffers behind a switch, while the views still emit. Debug check (D4): the
- sets agree with wlroots' on the views for every surface, every frame. Suites:
- `presentation_time`, `explicit_sync`, `output_scale`, `xdg_output`,
- `xwayland_fractional`, `capture`, `screencast`, and a multi-output, zoomed-camera
- case with a window spanning outputs.
-* **6b. Damage from the graph, beside the views.** Device damage from the events;
- Debug check that it covers what wlroots damaged on the views. Suites:
- `desktop_damage`, `panel_damage`, `single_pixel`, `glass_reblur`, the pixel
- goldens of `scene_baseline.py` and a forced-full-repaint comparison.
-* **6c. Hit testing on the graph.** `scene_data.hitTest` and `mini_map` pick from
- the items; Debug check against `wlr_scene_node_at` on the views over a grid of
- points at every zoom step. Suites: `window_corners` (clipped corners),
- `desktop_zoom`, `popup_constraint`, `taskbar_peek`, `input_protocols`,
- `files_drag`, `wlroots`-level pointer constraints.
-* **6d. Delete the view tree.** `present` keeps only what the graph needs (the
- snap, events, clip and shadow damage); views, `view_state`, `route_surface`,
- the lock marking, `rediwm_projection_node`/`source` and the group view trees
- go. The pass reads source buffers. Rewrite the projection notes in
- `AGENTS.md` and the master plan's stage 6 entry.
-* **6e. Stage cost gate** against stage 5, as 5e/5f ran it (same session, the
- performance profile, `glass_reblurs` recorded).
-
-## Cost expectations
-
-| Area | Expectation |
-|---|---|
-| Projection CPU | Lower: no view setters, no opaque-region mirroring, no buffer re-set per commit. |
-| Output build | About level: a visibility tally per surface item it already visits. |
-| Memory | Lower: one scene buffer and cache entry fewer per window leaf. |
-| Wakeups | Unchanged; frame callbacks still only from presented frames. |
-
-## Risks
-
-* **Silent protocol drift.** A wrong active set or primary output shows up as a
- client rendering at the wrong scale or stalling without frame callbacks, not as
- a crash. D4's comparisons exist for this; the suites above cover the protocols.
-* **Hidden surfaces.** wlroots clears outputs for disabled and fully occluded
- nodes; the replacement must do the same, or a minimized client keeps getting
- frame callbacks (idle wakeups) or never gets them back.
-* **Xwayland stacking** stays in the source tree (`Toplevel.raise`); hit testing
- in paint order must keep matching it.
-* **Pointer constraints, tablets, touch and drag-and-drop** all go through
- `hitTest`; one path keeps them consistent, and their suites run in 6c.
-
-## What was built (2026-10-11)
-
-The sub-stages ran in the order 6a, 6c, 6b, 6d: 6b is only testable once nothing
-else reads the views, so the view tree was disabled for it (the screen's damage
-then comes from the graph alone) and deleted afterwards.
-
-* **6a, feedback.** `rediwm_projection_feedback_begin/note/end` (`projection.c`),
- called from the pass's `collect`: per build, the pixels of each client surface
- that nothing above hides, over *every* output (a per-output tally flapped
- through "visible nowhere" when a window moved between outputs, because the
- other output's figure was stale). wlroots' rule is applied as it is in
- `scene.c`: an output is active above a tenth of the visible area, the primary
- one shows most, `outputs_update` is re-sent when an active output's scale,
- transform or subpixel changed (without that a live scale reload never reached
- the client). Signals go out on the *source* buffer, so `wlr_scene_surface`
- listens where it was built to; frame callbacks go through `Server.sendFrameDone`
- (the source buffers have no `visible` region, so wlroots' own
- `wlr_scene_buffer_send_frame_done` would stay silent). D4's comparison with the
- views' own state ran in Debug until it agreed on every suite.
-* **6c, hit testing.** `rediwm_projection_node_at`: the world's items top to
- bottom (rounded box, window shape, the source buffer's input region), the
- layout trees through `wlr_scene_node_at`. Compared with the view tree over a
- sweep of 6000 points per configuration (zoom steps 100 to 55 %, scales 1 and
- 1.5, one and two outputs) before the views went.
-* **6b, damage.** Every change goes through `damage_box` into one pending region
- that is applied to all outputs once per sync. What changes only what a leaf
- shows is cut to what of it was visible at the last build, as wlroots cut it to a
- node's visible region (otherwise a blinking cursor in a hidden terminal flips
- the output); a restack damages what moved (`damage_restacked`: the leaves
- outside the longest run that kept its order), shadow footprints included; a
- destroyed window or node applies at once, because a capture can build a frame
- before the next sync. D4's comparison was a **damage audit**: after each frame
- the same entries are drawn whole into a private buffer and compared with the
- real one. It found four bugs the suites did not (a closed window's group
- damaged nothing; a restacked window's shadow was not damaged; `paints` read the
- source buffer pointer, which GLES2 clears after upload, so a leaf stopped
- counting as shown; buffer damage went out as one bounding box). It stays as
- `-Ddamage-audit` (`TESTING.md`).
-* **6d, the views are gone.** `view_state`, `route_surface`, the lock marking,
- `rediwm_projection_node/source/node_zoom`, the group view trees and
- `Server`'s `world_view` are deleted; the pass reads buffers, textures, wait
- points and opaque regions from the source nodes (`rediwm_mirror_opaque` moved
- to `projection.c`). `projection_test.c` and `glass_test.c` test the graph,
- with new cases for restack, the visibility cut, destroy damage and the
- feedback sets (two outputs, the 10 % rule, a scale change); `output_scale.py`
- now also checks `wl_surface.enter/leave` and a window spanning the seam.
-* **Left out, as planned:** D5 (per-surface dmabuf feedback).
-
-## Results
-
-* `zig build test` 786 of 786, `test-projection`, `test-glass` pass.
-* About 60 integration suites against HEAD: every suite that fails on the tree
- fails on HEAD too (`screencast`, `glass_hold`, `desktop_zoom`, `taskbar_peek`,
- `mini_map`, `mini_map_canvas`, `wlr_protocols`, `animations`, `switcher`,
- `start_menu`, `window_titles`, `desktop_icons`, `desktop_canvas`, `power_menu`);
- `window_corners` and `xwayland` flake on HEAD as well. The damage audit is clean
- on the window, focus, snapping, tab, decoration, minimap, lock, layer, input,
- scale and damage suites. The `capture` suite shows a few corner pixels that
- predate this stage: isolated captures build into swapchain buffers they never
- submit, which upsets buffer age (worth fixing separately).
-* **Known limit:** a layer-shell surface *below* the world (background or bottom
- layer) is no longer occluded by windows in wlroots' eyes, so it keeps getting
- frame callbacks, and damage, while a window covers it. Everything above the
- world, and the world itself, is unaffected.
-* **Cost gate (6e)** (`scene-graph-stage6-cost.json`): ReleaseSafe builds of
- stage 5 (07806c3, the commit before this stage) and of the tree, interleaved
- s5, s6, s6, s5 with `tests/scene_baseline.py` on AC power in the performance
- profile (every session recorded both unchanged). Cells are the mean of each
- pair; the spread between the two runs of one build is the noise floor.
- * **Projection CPU: lower**, as expected. `projection_cpu` is -21 % in the
- median cell and in no cell above its pair spread; `resize` -78 to -83 % (the
- old view setters), `drag` -30 to -48 % (a noisy cell), glass cells -10 to
- -35 %.
- * **Output build and whole frame: level.** `cpu_frame` has a median of -1 %;
- the one rise beyond its spread is scale 1 `zoom_70` (+8 %, spread 6 %).
- `scene_commit_cpu` has a median of +2 % (the visibility tally): +7 to +11 % in
- scale 1 `zoom_85` and `zoom_70` and +9 % in mixed_noglass `spinner_clear`,
- each barely past a spread of 7 to 9 %. `gpu_elapsed` is within its spreads
- except scale 1 `zoom_85` (+5 %, spread 3 %). `glass_reblurs` per commit is
- unchanged in every cell outside mixed `fullscreen`, below.
- * **Instructions (clean sessions): level or lower.** Median 0 %; `resize` -6 to
- -11 %, `drag` -2 to -6 %. The only rises are `zoom_min_hold` at scale 1.5 and
- mixed (+4 % and +3 %, both pairs agree to the digit, about 7 k instructions
- per frame); the frame timers of the same cells do not show it, and its cause
- was not chased. Against stage 0 (the numbers in the stage 5 gate, a different
- session) every cell stays below it, -2 to -61 %.
- * **Memory: level, not lower.** The first pair read -0.4 to -1.1 MiB at scales
- 1 and 1.5 and +0.4 to +1.1 mixed; six more start-up and sustained runs of
- each build (three more runs of each, scale 1.5 and mixed, AC off, memory
- only) put the stage 6 mean at
- +0.0 to +0.3 MiB, inside the 0.8 MiB spread of one build between runs. The
- scene node and buffer removed per leaf are too small to read next to that.
- Still +0.8 to +2.5 MiB over stage 0, as after stage 5.
- * **Wakeups unchanged:** switches per second are within ±4 % in the cells that
- do not flake (`fullscreen` and `resize` vary 5 to 35 % between runs of one
- build; mixed `zoom_55` reads -7 %); idle shows 0.0 % CPU in every config.
- * **Mixed `fullscreen`** commits about half as often and re-blurs nothing:
- stage 5 committed 442 to 464 times in the cell and re-blurred under every
- commit, the tree 119 to 237 times and never. The cause was not isolated
- (stage 5's view damage reaching the output the client is not on is the likely
- one); the audit build run over the stats-mode workload (scale 1, 1.5, mixed)
- is silent, so no damage is missing.
- * **Pixels:** the 16 golden screenshots (scale 1, 1.5 and mixed, windows,
- zoom 70, zoom min and fullscreen) of the tree equal stage 5's at tolerance
- 0. They differ from the stage 0 goldens exactly as stage 5 does (window
- shapes, shadows and glass since stage 4).
diff --git a/docs/plans/scene-graph.md b/docs/plans/scene-graph.md
deleted file mode 100644
index f65b947..0000000
--- a/docs/plans/scene-graph.md
+++ /dev/null
@@ -1,242 +0,0 @@
-# Plan: compositor-owned scene graph and render pass
-
-Status: decided; stages 0–2 done, stage 3 in progress. Updated 2026-10-09.
-Replaces the September 2026 proposal.
-
-Decision (2026-10-08): clipped, rounded client corners are a hard requirement,
-and the way to get them is an owned render pass. Doing it properly matters more
-than doing it quickly. CPU and RAM are constraints this work must not break,
-not its motivation (see [Resource expectations](#resource-expectations)).
-
-## Why `wlr_scene` cannot do it
-
-RediWM draws through `wlr_scene` plus two layers built to work around it:
-
-* **Client corners are square.** `wlr_scene` and the wlroots 0.20 render pass
- cannot mask a texture. The frame reserves a footer band under the client
- (`chrome.footerHeight`, at least `ceil(radius)` tall) and draws the bottom
- arcs there. `Toplevel.probeClientEdge` reads back the client's last buffer
- row (GL readback, explicit-sync waits) to colour that band. Borders have two
- paths (`ChromeBuffer` arcs, `Toplevel.syncBorders` straight rects with
- `side_fills`). Shadows are CPU-rasterized corner/edge buffers.
-* **Integer coordinates.** `src/projection.c` mirrors every source node into
- a second tree to apply camera zoom, Xwayland `1/N` scale and fractional
- positioning, with a per-leaf `view_state` cache to keep the sync affordable.
-* **Backdrop effects are a side channel.** `src/glass.c` re-walks the scene
- (`capture_prefix`) into a private capture buffer per effect, enters its own
- GL context state per effect and flushes per effect (about 0.35 ms per
- re-blurred effect, 2026-09 measurement). It is GLES2-only
- (`wlr_renderer_is_gles2`; otherwise a CSS-style tint).
-
-Scene API reach: about 45 distinct `wlr_scene_*` functions, ~260 references,
-scene types in 49 source files. The frame path is `Output.handleFrame` →
-`scene_output.buildState` → `Output.commitFrameState`; screenshots
-(`screenshot/capture.zig`) and IPC capture call `buildState` too.
-
-## Target design
-
-**Retained from wlroots:** backends, `wlr_output`/`wlr_output_state` and
-`Output.commitFrameState`, swapchain and allocator, `wlr_damage_ring`, the
-GLES2 renderer's context, texture import and buffer FBOs, seat/input, Xwayland,
-and every protocol implementation (`wlr_surface`, subsurface, xdg-shell,
-layer-shell, viewporter, presentation, linux-dmabuf, drm-syncobj, screencopy).
-Client surface semantics stay behind an adapter; they are not reimplemented.
-
-**Owned:**
-
-* *Node graph.* Typed nodes (tree, rect, texture/surface, shadow, backdrop
- effect) with float logical coordinates, translate + uniform scale, opacity,
- and a clip shape. One source of geometry truth; zoom, `1/N` Xwayland scale
- and fractional placement are node properties, not a second tree.
-* *Clip groups.* A rounded-rect clip (per-corner radii) applies to a whole
- subtree: titlebar chrome, client surface and its subsurfaces, footer. It is
- evaluated in the fragment shader as a signed-distance coverage in device
- pixels, so AA is right at any scale or zoom. One shape function replaces the
- skirt, `probeClientEdge`, `side_fills`, the straight-rect border path and the
- chrome arcs. xdg popups are separate trees and are never clipped by a
- parent's shape.
-* *Analytic primitives.* Borders and shadows become shader primitives. A
- border is evaluated in the same fragment pass as the body it surrounds, never
- as a second draw over it (the two partial coverages multiply and leave a seam;
- stage 1, gate 3). CPU raster is left for what is really content: title text,
- icons, buttons.
-* *Output pass.* Per output: acquire swapchain buffer (age), accumulate
- damage, walk in paint order with opaque-region culling, draw with an owned
- GLES2 program driven directly on the wlroots context and buffer FBO, as
- `glass.c` already does (`wlr_gles2_renderer_get_buffer_fbo`,
- `wlr_gles2_texture_get_attribs`). The wlroots render pass has no custom
- shader or stencil, so it cannot be used for masked draws.
-* *Backdrop effects in the pass.* An effect samples the framebuffer drawn so
- far (a region copy), blurs, and composes through its clip shape. No prefix
- re-render, no separate pass, no per-effect context switch. Culling must keep
- what a blur reads, and damage under an effect expands to the effect's padded
- extent (a swapchain buffer's pixels outside the damage are stale).
-* *Distribution of surface feedback.* Frame callbacks, `wl_surface.enter/leave`,
- preferred scale, presentation feedback, dmabuf feedback tranches,
- explicit-sync acquire/release, primary output.
-* *Direct scanout* for an opaque fullscreen client with no clip, transform or
- effect above it (test with `wlr_output_test_state`).
-* *Hit testing and capture of node subsets.* Float hit tests honour the clip
- shape, so clicks on a transparent rounded corner reach the window below.
- Capture renders a node subset, replacing the owned adapter around
- wlroots' leaky scene capture helper.
-
-**Policy defaults (assumed, change in stage 0 if wrong):** radius is
-`border_radius` scaled by chrome density, 0 when maximized or fullscreen
-(the current `Toplevel.cornerRadius`). It applies to server-decorated native
-and Xwayland windows and to `.shell` windows (Settings). Client-side-decorated
-windows are not clipped by the compositor unless a rule asks. The footer
-reservation drops from `max(border, ceil(radius))` to the border width, so the
-radius-tall band returns to the client; every `footerHeight` consumer (snap,
-resize edges, layout, saved layouts, Xwayland, tabs, tests that pin titlebar
-or body heights) needs an audit.
-
-## Stages
-
-Every stage leaves a working compositor. The graph is the only geometry truth;
-a presenter consumes it and holds no geometry of its own. Switching between
-presenters during the migration uses a temporary config key (not an
-environment variable: no test hooks in production), removed in stage 6.
-
-0. **Baseline and inventory (no behaviour change).** *Done 2026-10-09 except
- the decisions: harness `tests/scene_baseline.py`, numbers, findings, both
- inventories and the decisions to confirm are in
- [scene-graph-baseline.md](scene-graph-baseline.md).*
- * Fixed workload and harness: three windows with glass, a 60 fps damage
- client, drag and resize, a fullscreen client, zoom steps and
- scales 1, 1.5 and mixed. Record `cpu_frame`, `projection_cpu`,
- `glass_cpu`, `scene_commit_cpu`, `gpu_elapsed`, wakeups, RSS and
- instructions:u; keep golden IPC screenshots of chrome, corners and glass.
- * Inventory exactly what `wlr_scene_output` does today for the projected
- tree (frame-done, enter/leave, presentation, dmabuf feedback, scanout,
- release points, primary output, damage/culling). That table is the
- checklist for stage 3.
- * Inventory what wlroots' GLES2 texture shader does that an owned shader
- must reproduce or consciously drop: external-OES targets, transfer
- function and primaries, range/encoding, premultiplied blending, filters.
- * Confirm the policy defaults above and the renderer decision below.
-1. **Pass spike (noninstalled fixture, `test-glass`-style pixel tests).**
- *Done 2026-10-09: all ten gates pass, after two design changes; results,
- costs and the open integration risks are in
- [scene-graph-stage1.md](scene-graph-stage1.md).*
- Draw a 2D and an external-OES client texture through the rounded clip at
- fractional scale and zoom; analytic border and shadow; blur from a
- framebuffer copy. Gate: no seams or fringe (extend `window_corners.py`
- criteria), correct premultiplied edges, measured cost within the stage 0
- baseline, buffer-age damage correct under an effect. Failing the gate is a
- result: revise the design before stage 2.
-2. **Typed node model behind the existing presenter.** *Done 2026-10-09: 16 of 16
- goldens bit-identical, instructions/s and RSS flat, +13 % on a steady-state
- sync; clip and tree opacity are left for stage 4, which is their first
- producer. Details in [scene-graph-stage2.md](scene-graph-stage2.md).*
- `projection.c`'s view sync consumes the typed graph (float coordinates, clip,
- opacity) and rounds for `wlr_scene`. No visible change; existing tests pass
- unchanged.
-3. **Owned output pass at parity (radius 0).** *Done 2026-10-09 except hardware
- qualification (a real KMS plane, out-timeline release and hotplug, which need
- a session of their own). Behind `[compositor] scene_renderer = "owned"`, legacy
- still the default; 16/16 goldens bit-identical, NV12 external textures covered.
- Cost passes the stage 3 tolerance below: build CPU at most +4.4 %, GPU at most
- +2.7 %, memory +0.44 MiB. See [scene-graph-stage3.md](scene-graph-stage3.md).*
- Everything in the stage 0
- inventory, plus capture, screenshots, lock coverage and hotplug through the
- new path. Exit: pixel-equivalent to the legacy presenter within tolerance
- and cost within the stage 3 tolerance, including scanout where it applied.
- **Stage 3 tolerance (decided 2026-10-09; this stage only):** while two
- backends coexist, "at or below baseline" is relaxed to, measured by the
- in-process frame-block A/B on ReleaseSafe against the legacy presenter in every
- cell (clear and under glass; scale 1, 1.5 and mixed): output-build CPU within
- +5 %, GPU elapsed within +5 %, instructions per committed frame within ±3 %,
- anonymous memory at most +0.5 MiB at startup and no growth under sustained
- damage. Stages 4–6 are judged against the stage 0 baseline, and the final state
- (stage 6) must again be at or below it.
-4. **Clipping and primitives.** *Done 2026-10-11 (4e merged after the stage 3
- hardware checklist passed):
- [scene-graph-stage4.md](scene-graph-stage4.md). The legacy presenter is gone;
- CPU per frame is 3-36 % below the stage 0 baseline, memory 1.6-2.3 MiB above
- it (a finding).*
- Clip groups on frames, analytic borders and
- shadows, shape-aware hit testing; delete the skirt, `probeClientEdge`,
- `side_fills`, the dual border path and `edge_sampling.py`; shrink the footer.
-5. **Backdrop effects in the pass.** *Done 2026-10-11 (CPU and GPU at or below stage 4 where glass re-blurs, memory below it):
- [scene-graph-stage5.md](scene-graph-stage5.md).* Delete `glass.c`'s prefix capture,
- per-effect contexts, dependency hashing and the drag hold; keep glass pixel
- tests, converted.
-6. **Delete.** *Done 2026-10-12 (projection CPU -21 % median, instructions and
- memory level with stage 5, pixels identical, uncommitted):
- [scene-graph-stage6.md](scene-graph-stage6.md); the legacy presenter and the
- temporary config key already went in stage 4e.* The projection's view tree is
- gone: surface feedback, damage and hit testing come from the graph, and the
- pass reads the source nodes. Updated `AGENTS.md` (rendering and damage rules),
- `TESTING.md` (the damage audit) and the tests.
-
-The old wlr_scene source tree stays as the surface adapter until a separate,
-later decision; replacing it is not part of this plan.
-
-## Resource expectations
-
-Hypotheses to confirm in stages 0, 1 and 3; the stage 0 baseline defines the
-numbers.
-
-| Area | Expectation |
-|---|---|
-| Idle CPU, wakeups | Unchanged. The pass adds no timers or polling. |
-| Per-frame, no glass overlap | About unchanged; the floor is wlroots/Mesa driver cost (parity with labwc at 60 fps damage in 2026-09). |
-| Glass over damage | Lower: no prefix re-render, context switch or flush per effect. The new cost is one backdrop region copy per effect. |
-| Client edge probe | Gone, with its GL readback and acquire-wait stalls. |
-| Chrome CPU on resize/move | Lower if arcs, borders and shadows stop being CPU rasters; title text still is. |
-| GPU | A mask multiply per client pixel is negligible; the backdrop copy is the real cost. Check `gpu_elapsed`. |
-| Scanout | Preserved for opaque fullscreen clients. |
-| RAM | Not above baseline: per-effect capture/output/intermediate buffers shrink, shadow/skirt buffers go; shader programs and damage rings are tiny. Stage 3 alone may exceed it by 0.5 MiB (a second set of programs) until stage 6 deletes the legacy path. |
-
-## Acceptance requirements
-
-Preserve surface commit ordering, explicit-sync fences, frame callbacks,
-presentation feedback, damage, hit-testing, colour transforms and colour
-descriptions, capture isolation, output hotplug and lock coverage. Include
-popups, IME candidates, subsurfaces, mixed and fractional scale, camera zoom
-steps down to `camera_zoom_min`, Xwayland at `N > 1`, tiles and maximize,
-close snapshots and the Settings shell window.
-
-Corner-specific: client pixels in the clipped corner are transparent (the
-backdrop shows through) with no bright fringe and no seam at any zoom step or
-scale; the same shape clips chrome and client; hit tests follow the shape.
-
-Run through existing suites, extended rather than duplicated: `window_corners`,
-`appearance_chrome`, `decorations`, `kde_decorations`, `capture`,
-`screencast`, `screenshot_regressions`, `explicit_sync`, `presentation_time`,
-`output_scale`, `output_destroy`, `lock_screen`, `layer_lifecycle`,
-`popup_constraint`, `focus_zoom`, `desktop_zoom`, `mini_map*`, `window_snapping`,
-`desktop_damage`, `panel_damage`, `single_pixel`, `wlr_protocols`, the perf
-scripts and `zig build test-glass` / `zig build test`. Compare CPU/GPU frame
-cost and scanout/plane use against the legacy renderer; do not assume glass
-makes scanout irrelevant. The render invariants are in
-[AGENTS.md](../../AGENTS.md) and the commands in [TESTING.md](../../TESTING.md).
-
-## Risks and open decisions
-
-* **Renderer policy (decided 2026-10-09).** The session requires GLES2, as
- glass already does; no pixman path is kept. Tests that default to pixman move
- to a render node (as `test-glass` already does); a machine without a GPU needs
- Mesa llvmpipe through `WLR_RENDERER_ALLOW_SOFTWARE`. Client-side-decorated
- windows are not clipped unless a rule asks (decided the same day).
-* **Reimplementing `wlr_scene_output` behaviour** is the main regression risk
- (frame callbacks, presentation timestamps, dmabuf feedback, enter/leave,
- release points). The stage 0 table and per-item tests are the mitigation.
-* **Colour management and external textures** must be matched in the owned
- shader or consciously dropped; decide in stage 0.
-* **Blur with buffer age.** Damage expansion under effects must be exact, or
- stale pixels appear in the blur.
-* **Binding gaps.** zig-wlroots lacks some needed APIs (damage ring,
- swapchain, GLES2 attribs); hand-declare them and keep the wlroots 0.20 ABI
- pin in `build.zig.zon`.
-* **Xwayland coupling.** `scene.restack_xwayland_surfaces = false` and
- `Toplevel.raise` sync scene and X11 stacking; the graph must keep that
- ordering contract.
-* **Footer change** alters client geometry; saved layouts and tests that pin
- titlebar/body sizes (the known 41 vs 35 titlebar assertion) need review.
-* **No second truth.** A temporary presenter or adapter must not grow its own
- geometry; if it does, stop and fold it into the graph.
-
-Independent of this plan and cheap: batch glass effects into one EGL
-enter/leave and drop the per-effect `glFlush` in `glass.c`.
diff --git a/docs/plans/theme-packs.md b/docs/plans/theme-packs.md
new file mode 100644
index 0000000..2e67a3d
--- /dev/null
+++ b/docs/plans/theme-packs.md
@@ -0,0 +1,325 @@
+# Plan: theme packs (colours plus icons, wallpapers and cursors)
+
+Status: implemented, 2026-10-13. Phases 0–6 use the proposed D1–D5 design.
+The implementation and author instructions are in `docs/themes.md`; the
+fixture and integration gates are in `tests/theme_packs.py`.
+
+The inventory below records the pre-implementation baseline. Pack discovery
+now lives in `config/theme_pack.zig`, application in `config_runtime/`, and
+archive handling in the separate `rediwm-theme` helper. The helper reuses
+Files' archive path normalization and direct image codecs; bounded ZIP
+streaming, cursor aliases and atomic publication have their own native path.
+
+Scope: a theme becomes a *pack*: the `[theme]` tokens it is today, plus the
+pictures that go with them (wallpapers, the start logo, shell glyphs, folder
+and file icons, optionally a cursor theme). A pack is shared as one file (a
+zip), installed with one click and applied as one choice in Appearance. No
+code, shaders or fonts travel in a pack.
+
+## Baseline before implementation
+
+A theme is TOML only, and only colours, sizes and font names:
+
+* **Tokens.** `ui/theme.zig`'s `Theme` struct (over 200 fields: colours,
+ radii, sizes, `font`, `mono_font`, `start_button_icon`). The tiny parser
+ reads a `[theme]` section; `writeInto` writes only the values that differ
+ from the built-in defaults.
+* **Where they live.** The applied theme is the `[theme]` section of
+ `config.toml` (plus `[taskbar_theme]`, the taskbar's own colours), with
+ `REDIWM_THEME` overlaid on top.
+* **Presets.** Three TOMLs embedded at build time (`assets/themes/`, listed by
+ `ui/theme_presets.zig`) plus every `*.toml` in `~/.config/rediwm/themes/`.
+ Picking one **copies** its values into `theme.global` and saves them to
+ `[theme]`. Which preset is active is not stored: Appearance re-parses every
+ preset and selects the one equal to the current theme, else "Custom".
+* **App clients.** Files, Images and PDF follow `config.toml`'s `[theme]`
+ through `files/settings.zig` (stat once per second, re-read on change). PDF
+ reads it once, before its sandbox closes the filesystem.
+
+Everything visual that is not a token is a separate setting, chosen
+separately:
+
+| What | Today | Chosen by |
+| --- | --- | --- |
+| Wallpaper | `[compositor] wallpaper`: file name in `share/rediwm/wallpapers` or `~/.local/share/rediwm/wallpapers`, or a path | Appearance strip |
+| Apps light/dark | `[compositor] dark_mode` (settings portal) | Appearance |
+| Start logo | `[theme] start_button_icon`, an **absolute** path | Appearance |
+| Shell glyphs (wifi, battery, sidebar, toolbar icons) | 49 SVGs `@embedFile`d into `ui/shell_icons.zig`, alpha masks tinted at paint time | nothing: compiled in |
+| Folder icons in Files | hand-drawn vector, `file_folder_back/front` tokens | tokens only |
+| File icons in Files, desktop icons, app icons | freedesktop icon theme, `icon_theme.zig` | `REDIWM_ICON_THEME` env only (default Adwaita), read at startup |
+| Cursors | Xcursor theme by name, `[input] cursor_theme`; phinger built and installed to `share/icons` | Appearance |
+| Sounds | freedesktop sound theme by name, `sound_theme` | config |
+
+So the user's reading is right: switching "theme" today changes colours and
+geometry; the wallpaper, glyphs and folder icons stay put. Two inconsistencies
+fall out of the survey and this plan fixes them in passing: the desktop draws
+folders with the icon theme's `folder` while Files draws its own vector one,
+and the icon theme is the only appearance setting with no UI and no config key.
+
+## Design
+
+### A pack on disk
+
+A pack is a directory; the zip is only how it travels (D1).
+
+```
+nord/
+ theme.toml required
+ preview.png optional, picker thumbnail (≤ 512×320)
+ logo.svg optional, start button
+ wallpapers/ optional, *.png *.jpg *.jpeg *.webp
+ glyphs/ optional, monochrome shell glyph overrides
+ icons/ optional, flat colour icon overrides (D4)
+ cursors/ optional, a built Xcursor theme (Phase 6)
+```
+
+`theme.toml` is today's format with two more sections. Everything in
+`[theme]` and `[taskbar_theme]` is read by the existing parser, so a single
+`.toml` preset is already a pack without assets, and keeps working:
+
+```toml
+[meta]
+format = 1 # packs from a newer format are refused with a message
+id = "nord" # [a-z0-9-], ≤ 64; defaults to the directory name
+name = "Nord"
+version = "1.2"
+author = "…"
+license = "CC-BY-SA-4.0"
+description = "Arctic blues."
+
+[theme] # unchanged token set
+accent = "#88c0d0"
+start_button_icon = "logo.svg" # relative: inside the pack
+
+[taskbar_theme] # optional, unchanged
+
+[assets]
+wallpaper = "nord-night.jpg" # default wallpaper, from wallpapers/
+color_scheme = "dark" # sets [compositor] dark_mode
+icon_theme = "Papirus-Dark" # optional base icon theme, by name (D4)
+cursor_theme = "pack" # "pack" = cursors/, or an installed name
+```
+
+Rules that keep packs safe and forward compatible:
+
+* Asset paths are relative and must resolve inside the pack (no `..`, no
+ absolute paths, no symlinks). An absolute `start_button_icon` stays legal in
+ `config.toml` only.
+* Unknown `[theme]` keys in a pack are logged and skipped, not fatal (today the
+ config loader fails on them), so a pack made for a newer RediWM still loads.
+* Glyphs are named like `assets/icons/` (`wifi.svg`, `view-grid.svg`,
+ `trash-outline.svg`), so an author starts by copying that directory. Only
+ alpha is used: they are tinted like the built-in ones.
+
+### Where packs are found
+
+In order, the first id wins (as `wallpapers.zig` does for file names):
+
+1. `$XDG_DATA_HOME/rediwm/themes/<id>/` (installed by the user)
+2. `~/.config/rediwm/themes/*.toml` (today's single-file presets; id = stem)
+3. `<prefix>/share/rediwm/themes/<id>/`, then `$XDG_DATA_DIRS/rediwm/themes/`
+ (distribution packs)
+4. The embedded presets (`rediwm-dark`, `rediwm-light`, `redi-blue`), which
+ stay embedded so a broken install still has a theme.
+
+Discovery and parsing go in `config/theme_pack.zig` (parsing is `config/`);
+applying goes in `config_runtime/`, beside today's reload path.
+
+### Config: a reference plus overrides (D2)
+
+`config.toml` names the pack and keeps only what the user changed on top:
+
+```toml
+[theme]
+base = "nord" # new key; absent = built-in defaults, i.e. today
+font_size = 14 # the user's own tweak, kept across pack updates
+```
+
+Layering: built-in defaults ← pack `[theme]` ← `config.toml [theme]` ←
+`REDIWM_THEME`. `writeInto` diffs against the resolved pack instead of
+`Theme{}`, so Appearance edits stay small and an updated pack reaches the
+user. Picking a pack clears the overrides (the same as a preset replacing
+everything today), and a "Reset to theme" button does the same without
+switching. Configs without `base` read exactly as today: that is Phase 1's
+regression test.
+
+`files/settings.zig` resolves `base` the same way, so Files and Images follow
+a pack switch; PDF keeps the pack it was started with (it has to read before
+its sandbox), as it already does for colours.
+
+### Assets at runtime
+
+* **Wallpaper.** An empty `[compositor] wallpaper` means "the theme's" (the
+ pack's `[assets] wallpaper`, else `default.png`). Picking an image in the
+ strip pins it; applying a pack resets it to "the theme's" (D3). The strip
+ gains the active pack's `wallpapers/` as a group. The lock screen uses the
+ same image, so it follows for free.
+* **Start logo.** `start_button_icon` relative to the pack.
+* **Glyphs.** `shell_icons.source` asks the active pack for `glyphs/<name>.svg`
+ first, then the embedded SVG. The mask cache is flushed on a pack switch
+ (`shell_icons.deinit`). Rasterising is synchronous on the caller's thread
+ (the compositor paints with it), so install-time validation bounds a glyph's
+ size and render time (below).
+* **Folder and file icons (D4).** A flat `icons/` directory (`<name>.svg` or
+ `<name>.png`, freedesktop names) is searched before the icon theme chain in
+ `icon_theme.zig`, which every icon user goes through: Files, the desktop, the
+ taskbar and the start menu. That makes overriding an *app* icon
+ (`firefox.svg`) free as well. The chain behind it is `[assets] icon_theme`,
+ else a new `[compositor] icon_theme` setting, else `REDIWM_ICON_THEME`, else
+ Adwaita. Files then draws a directory with the first icon found among its
+ XDG special name (`user-home`, `user-desktop`, `folder-documents`,
+ `folder-download`, `folder-music`, `folder-pictures`, `folder-videos`,
+ `folder-templates`, `folder-publicshare`, `user-trash`, from
+ `user-dirs.dirs`) and `folder`, and keeps today's vector folder when the
+ pack supplies neither. The desktop uses the same lookup, which ends the
+ Files/desktop mismatch. Icon caches (`icon_cache`, `icon_service`, Files'
+ and the desktop's) key on a pack generation so a switch re-resolves.
+* **Cursors (Phase 6).** `cursors/` is a built Xcursor theme (`index.theme`
+ plus `cursors/`). Installing links it as
+ `~/.local/share/icons/rediwm-<id>-cursors`, which is on `XCURSOR_PATH` for
+ wlroots, Xwayland and children, and applying sets `cursor_theme` through the
+ existing picker path. Xcursor aliases are symlinks, so the installer allows
+ exactly one kind: inside `cursors/cursors/`, a target with no `/`.
+
+Nothing here adds a wakeup: packs are read on apply, on config reload and on
+start, and no pack directory is watched.
+
+### Installing, removing, sharing
+
+The compositor never opens an untrusted archive and does not link libarchive.
+A small helper, `rediwm-theme`, does, reusing `files/archive.zig` (libarchive,
+already rejecting unsafe paths, links, special files and oversized entry
+counts):
+
+```
+rediwm-theme install <file.rediwm-theme|.zip|dir> # validate, extract, print id
+rediwm-theme validate <dir> # for authors
+rediwm-theme pack <dir> <out.rediwm-theme> # for authors
+rediwm-theme remove <id>
+```
+
+Install extracts into `themes/.staging-XXXXXX/`, validates there, then renames
+into `themes/<id>/` (`RENAME_EXCHANGE` when upgrading, then deletes the old
+copy), so a running compositor never sees half a pack. Validation:
+
+* Zip only; the pack is the archive root or its single top-level directory.
+* Regular files and directories only (plus the cursor alias exception); at
+ most 4,000 entries, 128 MiB unpacked in total, 40 MiB per file, counted
+ while streaming so a bomb stops early.
+* Allowed by place: `theme.toml`, `preview.png`, `logo.svg|png`,
+ `wallpapers/*.{png,jpg,jpeg,webp}`, `glyphs/*.svg`, `icons/*.{svg,png}`,
+ `cursors/**`, and `README*`, `LICENSE*`. Anything else is refused by name.
+* `theme.toml` parses; every image decodes; every SVG renders at 256 px.
+ Glyphs: ≤ 64 KiB and under 10 ms to render at 256 px; icons: ≤ 512 KiB.
+ Wallpapers: ≤ 16384 px a side. A failure names the file and the rule.
+* An id already installed asks "Replace Nord 1.1 with 1.2?" in Appearance.
+
+The helper is a child of the compositor (or of Files), runs with no
+privileges, and can enter a Landlock/seccomp sandbox limited to the staging
+directory, like PDF's (`rediwm_pdf_sandbox_enter`); a crafted archive that
+breaks libarchive or librsvg then crashes the helper, not the session.
+Appearance runs it as a job with an eventfd, as it does the GTK/Qt colour
+export (`AppColorsJob`).
+
+Entry points:
+
+* Appearance: "Install theme…" (file chooser), and "Remove" on user-installed
+ packs. Removing the active pack switches to RediWM Dark first.
+* Files: a `.rediwm-theme` file opens with "Install theme" (a shared-mime-info
+ type `application/x-rediwm-theme`, glob `*.rediwm-theme`, in `data/`).
+* IPC: `theme.list`, `theme.apply`, `theme.install` for tests and scripts.
+ They are settings writes: `SessionLocked` while locked, and sandboxed callers
+ need an `[[sandbox_allow]]` allowance like the rest of settings IPC.
+* "Save current look as theme…" (Phase 5): writes a pack from the current
+ tokens, wallpaper and logo into `themes/<id>/`; `rediwm-theme pack` zips it.
+
+### Security notes
+
+* The greeter loads no packs (it reads nothing from a user's home and
+ writes nothing under `$HOME`); `tests/greeter.py` must still pass. Themed
+ login screens from system packs (`share/rediwm/themes`, chosen in
+ `rediwm-dm.conf`) are a possible later item, not this plan.
+* A broken or missing pack never blocks locking: lock UI and wallpaper are
+ already optional there, and every asset falls back to the built-in one.
+* SVGs are rendered from data with no base URI, so they cannot pull in files
+ outside themselves.
+* No fonts, scripts, shaders, `.desktop` files or anything executable. Fonts
+ are referenced by family name; bundling them (private `FcConfigAppFontAddDir`
+ for RediWM processes only) is a possible later item.
+
+## Decisions
+
+* **D1, zip at runtime or only in transit.** Chosen: only in transit; the
+ installed form is a directory. Xcursor and icon loaders, the wallpaper
+ decoder, Files, the desktop and the sandboxed PDF viewer all take paths;
+ the compositor would otherwise need libarchive and decompression on its
+ paths; validation happens once instead of on every read; and authors edit a
+ directory and see the result. Cost: a pack takes its unpacked size on disk.
+* **D2, reference or copy.** Chosen: `[theme] base = "<id>"` plus overrides
+ (above). Alternative: keep copying tokens and only add `base` for assets;
+ simpler, but pack updates never reach colours and Appearance keeps guessing
+ the active preset by equality.
+* **D3, wallpaper on switch.** Chosen: applying a pack resets the wallpaper
+ to the pack's; a later pick in the strip pins it until the next switch.
+ Alternative: keep the user's wallpaper unless it was the theme's.
+* **D4, icons.** Chosen: a flat `icons/` override directory in packs, plus a
+ base icon theme referenced by name. Full freedesktop icon themes (10,000 to
+ 50,000 files, tens of MiB) are not carried inside packs.
+* **D5, file name.** Chosen: `.rediwm-theme` (a zip) registered for
+ double-click install, and plain `.zip` accepted by the helper and the file
+ chooser.
+
+## Phases
+
+Each phase ends with the usual gate: Debug and ReleaseSafe builds,
+`zig build test`, the touched integration tests, HEAD comparison for
+known-failing suites.
+
+0. **Inventory** (no code). The glyphs each surface uses (compositor, Files,
+ Images, PDF, desktop), the icon names Files and the desktop ask for, and a
+ sample pack in `tests/fixtures/theme-pack/` (one glyph, `folder.svg`, a
+ small wallpaper, a logo) that every later phase tests with.
+1. **Packs without assets.** `config/theme_pack.zig` (format, discovery,
+ `[meta]`), `[theme] base`, layered resolve, `writeInto` against the base,
+ unknown pack keys skipped. Appearance lists packs with their names and
+ remembers the active one; "Reset to theme". `files/settings.zig` resolves
+ `base`. Unit tests: a config without `base` resolves to today's theme; a
+ save writes only overrides; the three presets resolve as before.
+2. **Wallpaper, logo, colour scheme.** `[assets] wallpaper` and
+ `color_scheme`, relative `start_button_icon`, the strip's pack group, D3's
+ reset. The lock screen check that it follows.
+3. **Glyphs.** Override lookup in `shell_icons`, cache flush on switch, app
+ clients follow, PDF reads its pack before the sandbox.
+4. **Folder and file icons.** The flat `icons/` lookup in `icon_theme.zig`,
+ `[compositor] icon_theme` with a picker, generation-keyed caches, Files'
+ special-folder names, the desktop on the same lookup.
+5. **Install, remove, share.** `rediwm-theme` (install, validate, pack,
+ remove), its sandbox, Appearance install/remove/replace, Files double-click
+ and the MIME type, IPC `theme.*`, "Save current look as theme…".
+6. **Cursors.** `cursors/` in packs, the alias exception, the
+ `~/.local/share/icons` link, applied through the cursor picker path.
+
+Phases 2 to 4 can land in any order after 1; 5 needs only 1, so packs can be
+installed (and tested from a zip) as soon as there is anything to install.
+
+## Tests
+
+* Unit: pack parsing (format, ids, relative paths, unknown keys), layering
+ and saving, discovery order and id collisions, the installer's path rules.
+* Integration, a new `tests/theme_packs.py` on the fixture pack: install by
+ IPC from a zip, apply, then check by IPC screenshot that a glyph, the Files
+ folder icon, the desktop folder, the wallpaper and the start logo changed;
+ switch back and check they return; remove the active pack.
+* Hostile archives, each refused with its message and nothing left in
+ `themes/`: `../` and absolute paths, a symlink out, a device node, a zip
+ bomb, 10,000 entries, a disallowed file, a glyph that takes 2 s to render,
+ a wallpaper of 40000×40000, a malformed `theme.toml`.
+* `tests/greeter.py` (no packs read), and the existing Appearance and
+ wallpaper tests with a scratch `XDG_STATE_HOME` and `XDG_DATA_HOME`.
+
+## Not in this plan
+
+* Downloading packs (no catalog, no network).
+* Fonts inside packs; exporting a pack's icons to GTK/Qt apps (the GTK/Qt
+ colour export stays as it is); light and dark variants in one pack (one pack
+ per look, like RediWM Dark and Light today); sounds; themed login screens.
diff --git a/docs/plans/tiling-gaps.md b/docs/plans/tiling-gaps.md
new file mode 100644
index 0000000..8e8b1b1
--- /dev/null
+++ b/docs/plans/tiling-gaps.md
@@ -0,0 +1,194 @@
+# Plan: closing the tiling gap to Hyprland
+
+Status: draft, 2026-10-12. The first two gaps (where new windows go, and
+motion) are done, uncommitted; everything below them is a proposal. Nothing in
+it is decided.
+
+Scope: what RediWM's workspace mode (`docs/plans/optional-tiling.md`) still
+lacks next to Hyprland and the other tiling compositors, in the order a user
+coming from them would notice, with a sketch of how each fits the code.
+Canvas mode is out of scope.
+
+## Where we are
+
+Workspace mode has one automatic layout: a recursive binary split
+(`auto_layout.zig`, pure) bridged to windows by `auto_tiling.zig`, with
+per-workspace automatic/floating, keyboard focus/swap/split resize/rotation,
+Super-drag insertion with a preview and Escape, tab groups as one tile, client
+size limits respected (overflow floats), multi-window undo, restart restore,
+32 workspaces with `ext-workspace-v1`, per-app floating rules, a Settings page
+and typed IPC.
+
+Done in this round:
+
+1. **New windows split the focused tile**, as in Hyprland's dwindle and in
+ i3/Sway. `workspaces.mapped` records the window that had focus on the
+ workspace (`Toplevel.auto_anchor`); `Tree.sync` splits that leaf along its
+ longer side, and falls back to the previous rule (beside the member admitted
+ before) when the anchor has no tile. A window moved to another workspace
+ joins beside that workspace's focused window.
+2. **Motion.** Reflows glide: `setAutoTile` reuses the animated move and frame
+ resize that canvas snapping uses (`window_move`/`window_resize` curves).
+ Entering the mode, output changes and restored layouts stay instant
+ (`Manager.quiet`), as do live split drags, hidden workspaces and a window's
+ first tile while it opens. A settled frame animation now gives way to the
+ size the client actually took once it has answered the configure
+ (`size_wait`), so a client that cannot fit a tile is no longer clipped to
+ it. Workspace switches slide: the higher number arrives from the right,
+ along an axis no other display shares (else from below; with displays on
+ both axes, or with reduced motion, a cross-fade), at the `desktop_switch_ms`
+ speed canvas desktop switches use. The leaving workspace's windows stay
+ drawn but inert (`rediwm_projection_set_tree_inert`) until they are off
+ screen, so hidden workspaces still take no input. Input follows what is
+ drawn, so a click during a glide or slide lands where the window is shown.
+
+## Remaining gaps
+
+Ordered by how soon a Hyprland or Sway user would miss each. Sizes are rough:
+S is a day, M a few days, L a week or more.
+
+### 3. One layout only (M to L)
+
+Hyprland 0.54 (Feb 2026) ships dwindle, master, scrolling and monocle, chosen
+per workspace; 0.55 (May 2026) adds layouts written in its Lua config. Sway has
+split/tabbed/stacking per container; niri is built around scrolling columns.
+
+Proposal, in this order:
+
+* **Per-workspace layout choice.** `Workspace.automatic: bool` becomes
+ `layout: enum { floating, split, master, monocle }` (persisted in the v2
+ workspace JSON, which needs a version bump or an additive field; shown in
+ Settings → Desktop beside today's automatic/floating choice; an IPC setter
+ and a `cycle_layout` action).
+* **Monocle (S–M).** Every member gets the usable box and only the focused one
+ is shown. Tab groups already do "one shown, the rest hidden but kept"
+ (`tab_hidden`, `window_tabs.visible`); monocle can reuse that visibility rule
+ without forming a group, so Alt+Tab, the taskbar and focus cycling work
+ unchanged.
+* **Master/stack (M).** A second pure module beside `auto_layout.zig` with the
+ same `Member`/`Box` types: one master column (count and ratio adjustable),
+ the rest stacked. Insertion order is `workspace_order`, so it is
+ deterministic. Swap, focus and resize actions map onto it (swap with master,
+ grow master).
+* **Scrolling (L), later.** Columns on a strip wider than the output. The
+ camera machinery from canvas mode (pan animation, `camera_pan` curve) is the
+ natural base, but workspace mode fixes the camera today, and picks, popups and
+ glass holds all assume that. Worth a plan of its own.
+* User-defined layouts are not planned; RediWM has no scripting runtime.
+
+### 4. Missing tools (S each, except the scratchpad)
+
+* **Scratchpad / special workspace (M).** A workspace that is not on any
+ output and toggles over the current one (Hyprland's `special`, Sway's
+ scratchpad). Workspace slots are fixed at 32 and owned by outputs; a 33rd
+ slot that `visible()` treats as shown over the focused output, floating only,
+ is the smallest change. Super+S (left free by the preset on purpose).
+* **Pin (S).** A floating window shown on every workspace of its output:
+ `visible()` returns true for pinned windows regardless of `workspace_id`;
+ workspace transfers skip them. Super+P is also free.
+* **Pseudotile (S).** Hyprland keeps a window's preferred size centred in its
+ tile. RediWM already leaves a bounded client's unused space in its tile
+ (top-left, not centred); a per-window flag that sets `max_width/height` to the
+ window's floating size, plus centring in `Node.place`, gives the same result
+ through the existing constraint path.
+* **Open on workspace N (S).** A `workspace` window-rule property beside
+ `output` (`config/window_rules.zig`), applied in `workspaces.mapped` before
+ the output's workspace is taken. Today only `output` and `floating` exist.
+* **Monitor actions (S).** `focus_output left/right`, `move_to_output
+ left/right` (with follow) and `move_workspace_to_output`. IPC already moves a
+ window to an output (`move_window_to` with `output`, `Toplevel.moveToOutput`);
+ the keybinding actions and a workspace-level move are missing.
+
+### 5. Configuration depth (S each)
+
+* **Inner and outer gaps.** One `window_gap` is both today
+ (`Tree.arrange`); Hyprland has `gaps_in`/`gaps_out`. Split it into two
+ settings, keeping `window_gap` as the default for both.
+* **Smart gaps / no border when alone.** No gaps and no outline when a
+ workspace has one tile.
+* **Focus outline.** Fixed at 1 logical px in `workspace_active_border`;
+ add a width and an inactive colour. Gradients are not worth the shaped-pass
+ cost.
+* **Binding modes (submaps).** A `[keybinds.workspace.resize]`-style table
+ entered by an action and left by Escape; the shortcut resolver already
+ switches tables per mode, so a third level is a resolver change plus Settings
+ display.
+* **Touchpad swipe between workspaces (M).** Three/four-finger horizontal
+ swipes currently go to clients (`zwp_pointer_gestures_v1`). A compositor
+ swipe that drives the new slide offset with the finger and settles with a
+ spring (the `Anim.retargetWith` velocity path) would match Hyprland and
+ niri. Needs the shortcut-inhibit and lock rules the other gestures follow
+ (`src/input/AGENTS.md`).
+
+### 6. Animation polish (S each)
+
+Follow-ups to item 2:
+
+* **Tile open/close.** New tiles take their first rectangle at once while the
+ open animation plays; Hyprland's "popin" grows the window from its tile. A
+ scale-from-tile variant of `window_open` would read better.
+* **Slide on several displays.** Side-by-side outputs slide vertically, a 2×2
+ arrangement cross-fades. Hyprland clips each workspace to its monitor
+ instead. Clipping needs a rectangular output clip intersected with each
+ window's rounded clip in the shaped pass, which the pass cannot express
+ today (one rounded clip per item).
+* **Split side under the cursor.** Hyprland's dwindle puts the new window on
+ the side of the focused tile nearest the pointer; RediWM always uses the
+ right/bottom half. Cheap to add as an option.
+* **Frame resize cost.** Easing frames used to re-raster their titlebar for
+ every device pixel of width change (`ChromeBuffer.create`). They now stretch
+ the last raster within 12% of its width and raster exactly at rest
+ (`Toplevel.stretchesTitlebar`, which canvas snaps and maximize share).
+ Measured on a ReleaseSafe build, headless GLES2, 1280×720 logical at 1.5×,
+ four tiles whose root split rotates (every tile moves and resizes), 12
+ reflows: instant tiling costs ~14 ms CPU per reflow; the glide cost ~115 ms
+ with ~68 titlebar rasters and 6.0 ms average frames (p95 9 ms) before the
+ stretch, and ~68 ms with ~20 rasters and 3.1 ms average frames (p95 8 ms)
+ after. The p95 comes from all tiles crossing the 12% step on the same frame;
+ staggering them, or splitting the titlebar into a stretchable band and a
+ fixed control strip, would flatten it. Worth re-measuring on a 2560×1600
+ panel with six or more tiles.
+
+### 7. Extensibility (not planned)
+
+Hyprland has plugins, a large dispatcher set and, since 0.55, Lua
+configuration with a layout API. RediWM's typed IPC with lock and sandbox
+checks covers automation; a plugin ABI or a scripting runtime is out of scope.
+What is worth matching is coverage: every new action above should be an IPC
+`tiling_action`/workspace action as well as a binding.
+
+### 8. Maturity
+
+Workspace mode is still opt-in, and the qualification record
+(`docs/plans/optional-tiling-qualification.md`) has physical multi-display
+checks pending. Making it a peer of canvas mode needs that checklist done
+first, independent of features.
+
+### Not planned
+
+Sway's arbitrary-arity containers, stacking layout, marks and focus
+parent/child. The binary tree plus tab groups covers what those are mostly used
+for, and the tree's undo, persistence and drag insertion all assume two
+children per split.
+
+## Suggested order
+
+1. Monitor actions, workspace window rule, inner/outer and smart gaps (all S,
+ independent).
+2. Per-workspace layout choice with monocle.
+3. Scratchpad and pin.
+4. Master/stack.
+5. Touchpad workspace swipe.
+6. Scrolling, as its own plan.
+
+## Sources
+
+Hyprland facts are from release coverage, not hands-on use:
+
+* Hyprland 0.54, per-workspace layouts, scrolling and monocle in core:
+ https://hypr.land/news/update54,
+ https://linuxiac.com/hyprland-0-54-brings-per-workspace-layouts/
+* Hyprland 0.55, Lua configuration and user-defined layouts:
+ https://phoronix.com/news/hyprland-0.55-wayland-comp
+* Hyprland 0.56 (July 2026), not checked against the official changelog:
+ https://www.linuxcompatible.org/story/hyprland-056-ships-with-expanded-lua-scripting-motion-blur-and-zero-breaking-changes/
diff --git a/docs/themes.md b/docs/themes.md
new file mode 100644
index 0000000..a43eb3c
--- /dev/null
+++ b/docs/themes.md
@@ -0,0 +1,128 @@
+# Theme packs
+
+Choose a pack in **Settings → Appearance → Theme**. Changes to colours,
+fonts and geometry are stored as overrides of that pack. **Reset to theme**
+clears those overrides; choosing a different pack also resets its wallpaper
+and cursor. Picking a wallpaper afterward pins that choice until the next
+pack switch. **Icon theme** chooses the installed icon theme behind a pack's
+own icons (the pack's `icon_theme`, when specified, takes precedence).
+
+**Install theme…** accepts a `.rediwm-theme` or `.zip` file. **Remove** is
+available for user-installed packs and switches an active pack to RediWM Dark.
+An existing pack requires **Replace installed theme**. **Save look…** saves
+the current colours, geometry, wallpaper and logo as an installed pack and a
+shareable archive; use a lowercase filename such as `my-look.rediwm-theme`.
+Files installs `.rediwm-theme` files when opened and reports the result.
+
+A pack is a directory. Archives contain that directory's files at their root,
+or one enclosing directory. No code, bundled fonts or shaders are accepted.
+
+```text
+my-look/
+ theme.toml
+ preview.png optional, at most 512×320
+ logo.svg optional; logo.png also works
+ wallpapers/ PNG, JPEG or WebP
+ glyphs/ monochrome SVGs, named like assets/icons/
+ icons/ flat freedesktop names, SVG or PNG
+ cursors/
+ index.theme optional built Xcursor theme
+ cursors/
+```
+
+```toml
+[meta]
+format = 1
+id = "my-look" # lowercase a–z, digits and hyphens; at most 64
+name = "My look"
+version = "1.0"
+author = "Example"
+license = "CC0-1.0"
+description = "A blue desktop."
+
+[theme]
+accent = "#88c0d0"
+start_button_icon = "logo.svg"
+
+[assets]
+wallpaper = "night.png" # inside wallpapers/
+color_scheme = "dark" # dark or light
+icon_theme = "Adwaita" # optional installed theme, behind icons/
+cursor_theme = "pack" # cursors/, or an installed cursor-theme name
+```
+
+`[taskbar_theme]` optionally supplies the taskbar's own colours. Unknown
+`[theme]` tokens are logged and skipped. Relative asset paths stay inside the
+pack; absolute paths, `..` and symlinks are refused. The only symlink exception
+is a cursor alias in `cursors/cursors/` whose target is a regular cursor file
+in that same directory.
+
+The user's configuration names the pack and just its personal edits:
+
+```toml
+[theme]
+base = "my-look"
+font_size = 14
+```
+
+Resolution is defaults → pack → config overrides → `REDIWM_THEME`. A missing
+or broken pack falls back to defaults. Configurations without `base`, and
+legacy single-file presets in the config directory's `themes/`, still work.
+Files and Images resolve the same layers; PDF freezes them before sandboxing.
+A pack is read on startup, config reload or apply; no pack directories are
+watched and no additional polling is introduced.
+
+Discovery uses the first occurrence of an ID: `$XDG_DATA_HOME/rediwm/themes`,
+legacy config presets, the binary's `../share/rediwm/themes`,
+`$XDG_DATA_DIRS/rediwm/themes`, then the embedded RediWM Dark, RediWM Light
+and Redi Blue packs. Without `XDG_DATA_HOME`, use `~/.local/share`.
+
+The helper is also available from a terminal:
+
+```sh
+rediwm-theme validate my-look/
+rediwm-theme pack my-look/ my-look.rediwm-theme
+rediwm-theme install my-look.rediwm-theme
+rediwm-theme install my-look.rediwm-theme --replace
+rediwm-theme remove my-look
+```
+
+Installs validate in a private staging directory and publish by atomic rename
+(or exchange on replacement). Archive parsing and asset validation run in
+separate children, restricted by Landlock when supported and seccomp, with
+memory and time bounds. There are at most 4,000 entries, 128 MiB unpacked,
+40 MiB per file, 512 KiB per icon and 64 KiB per glyph. Glyphs must render
+at 256 px in less than 10 ms; wallpaper sides are at most 16,384 px. SVG pack
+assets are rendered from data without a base URI. A failed install names the
+file and rule, cleans staging, and leaves an existing pack intact.
+
+IPC exposes `theme.list`, `theme.apply` (`{"id":"my-look"}`), and
+`theme.install` (`{"path":"/path/pack.rediwm-theme","replace":false}`).
+Install completes asynchronously while the event loop stays responsive.
+All three follow the IPC session-lock and sandbox allowance checks.
+
+## Asset inventory
+
+| Consumers | Artwork source |
+| --- | --- |
+| Compositor panels and titlebar controls | Theme tokens and shared shell SVG alpha masks |
+| Files, Images and PDF controls | The same shell masks, tinted with their effective theme |
+| Desktop Home/Trash | Shared shell masks and pack icon overrides |
+| Files directories and desktop folders | XDG special-folder name, then `folder`, through shared icon lookup |
+| Files documents | Association candidates and MIME icon names |
+| Taskbar, titlebars and Start menu applications | App icon names through shared icon lookup |
+| Wallpaper and lock-screen backdrop | Pack wallpaper unless a separate choice is pinned |
+| Start button | Pack logo or the embedded RediWM logo |
+
+Glyph filenames are the names in `assets/icons/`, including `wifi.svg`,
+`notification-bell.svg`, `speaker.svg`, `trash-outline.svg` and
+`view-grid.svg`. Only alpha is used. Flat colour icon overrides include
+`folder`, `user-home`, `user-desktop`, `folder-documents`, `folder-download`,
+`folder-music`, `folder-pictures`, `folder-videos`, `folder-templates`,
+`folder-publicshare`, `user-trash`, MIME names, and application icon names.
+XDG special directories come from `user-dirs.dirs`.
+
+The small pack in `tests/fixtures/theme-pack/` supplies a glyph, folder icon,
+wallpaper and logo. `tests/theme_packs.py` adds a real cursor and exercises
+installation, live switching, restoration, overrides and hostile archives.
+The greeter never discovers or reads user packs.
diff --git a/scripts/install-session-root.sh b/scripts/install-session-root.sh
index 4c4ecd3..a03a3cb 100755
--- a/scripts/install-session-root.sh
+++ b/scripts/install-session-root.sh
@@ -12,14 +12,18 @@ umask 022
install -d /usr/local/bin
stage=$(mktemp -d /usr/local/bin/.rediwm-install.XXXXXX)
trap 'rm -rf -- "$stage"' EXIT HUP INT TERM
-for binary in rediwm rediwm-msg rediwm-files rediwm-images rediwm-editor rediwm-pdf rediwm-share-picker rediwm-session rediwm-dm rediwm-accounts-helper; do
+for binary in rediwm rediwm-msg rediwm-theme rediwm-files rediwm-images rediwm-editor rediwm-pdf rediwm-share-picker rediwm-session rediwm-dm rediwm-accounts-helper; do
install -m755 "$release_dir/bin/$binary" "$stage/$binary"
done
+install -Dm644 "$repo_dir/data/rediwm-theme.desktop" /usr/local/share/applications/rediwm-theme.desktop
+install -Dm644 "$repo_dir/data/rediwm-theme.xml" /usr/local/share/mime/packages/rediwm-theme.xml
install -Dm644 "$repo_dir/data/rediwm-files.desktop" /usr/local/share/applications/rediwm-files.desktop
install -Dm644 "$release_dir/share/icons/hicolor/256x256/apps/redi-fm-icon.png" /usr/local/share/icons/hicolor/256x256/apps/redi-fm-icon.png
install -Dm644 "$repo_dir/data/rediwm-images.desktop" /usr/local/share/applications/rediwm-images.desktop
install -Dm644 "$repo_dir/data/rediwm-editor.desktop" /usr/local/share/applications/rediwm-editor.desktop
install -Dm644 "$repo_dir/data/rediwm-pdf.desktop" /usr/local/share/applications/rediwm-pdf.desktop
+if command -v update-mime-database >/dev/null 2>&1; then update-mime-database /usr/local/share/mime; fi
+if command -v update-desktop-database >/dev/null 2>&1; then update-desktop-database /usr/local/share/applications; fi
install -Dm644 "$repo_dir/data/rediwm-portals.conf" /usr/local/share/xdg-desktop-portal/rediwm-portals.conf
# xdg-desktop-portal reads backend descriptors only from its own datadir.
install -Dm644 "$repo_dir/data/rediwm.portal" /usr/share/xdg-desktop-portal/portals/rediwm.portal
@@ -54,7 +58,7 @@ cp -R "$release_dir/share/rediwm/wallpapers" /usr/local/share/rediwm/.wallpapers
chmod -R u=rwX,go=rX /usr/local/share/rediwm/.wallpapers-new
rm -rf /usr/local/share/rediwm/wallpapers
mv -T /usr/local/share/rediwm/.wallpapers-new /usr/local/share/rediwm/wallpapers
-for binary in rediwm rediwm-msg rediwm-files rediwm-images rediwm-editor rediwm-pdf rediwm-share-picker rediwm-session rediwm-dm rediwm-accounts-helper; do
+for binary in rediwm rediwm-msg rediwm-theme rediwm-files rediwm-images rediwm-editor rediwm-pdf rediwm-share-picker rediwm-session rediwm-dm rediwm-accounts-helper; do
mv -fT "$stage/$binary" "/usr/local/bin/$binary"
done
# The compositor draws the desktop itself; the old client is retired.
diff --git a/scripts/install-session.sh b/scripts/install-session.sh
index c2a3e6a..e0e4e1d 100644
--- a/scripts/install-session.sh
+++ b/scripts/install-session.sh
@@ -53,7 +53,7 @@ if [ "$prebuilt" = no ]; then
wlroots_flag=${REDIWM_WLROOTS_PREFIX:+-Dwlroots-prefix=$REDIWM_WLROOTS_PREFIX}
as_user zig build -Doptimize=ReleaseSafe -j"$ZIG_JOBS" --prefix "$release_dir" $wlroots_flag
fi
-for binary in rediwm rediwm-msg rediwm-files rediwm-images rediwm-editor rediwm-pdf rediwm-share-picker rediwm-dm rediwm-accounts-helper; do
+for binary in rediwm rediwm-msg rediwm-theme rediwm-files rediwm-images rediwm-editor rediwm-pdf rediwm-share-picker rediwm-dm rediwm-accounts-helper; do
test -x "$release_dir/bin/$binary"
done
as_root sh "$repo_dir/scripts/install-session-root.sh" "$repo_dir" "$release_dir" "$dm_flag"
diff --git a/scripts/install.sh b/scripts/install.sh
index 7ee4a8b..2d97cc0 100755
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -198,7 +198,7 @@ case "$FAMILY" in
arch)
deps="wayland wayland-protocols pixman libxkbcommon \
freetype2 harfbuzz fontconfig librsvg cairo pango libinput poppler-glib libseccomp \
- libarchive libpng libjpeg-turbo libpulse pipewire pam mesa pkgconf git python \
+ libarchive libwebp libxcursor libpng libjpeg-turbo libpulse pipewire pam mesa pkgconf git python \
xorg-xwayland xdg-desktop-portal xdg-desktop-portal-wlr xdg-desktop-portal-gtk"
if [ "$PRIVATE_WLROOTS" = no ]; then
deps="wlroots0.20 $deps"
@@ -221,13 +221,13 @@ case "$FAMILY" in
libxcb-res0-dev libxcb-xfixes0-dev libxcb-dri3-dev libxcb-present-dev \
libxcb-render-util0-dev libxcb-shm0-dev libxcb-xinput-dev xwayland \
libfreetype-dev libharfbuzz-dev libfontconfig-dev librsvg2-dev libcairo2-dev libpango1.0-dev libgdk-pixbuf-2.0-dev \
- libglib2.0-dev libarchive-dev libpng-dev libjpeg-dev libpulse-dev libpipewire-0.3-dev libpam0g-dev libpoppler-glib-dev libseccomp-dev \
+ libglib2.0-dev libarchive-dev libwebp-dev libxcursor-dev libpng-dev libjpeg-dev libpulse-dev libpipewire-0.3-dev libpam0g-dev libpoppler-glib-dev libseccomp-dev \
xdg-desktop-portal xdg-desktop-portal-wlr xdg-desktop-portal-gtk"
;;
fedora)
deps="wayland-devel wayland-protocols-devel pixman-devel libxkbcommon-devel \
freetype-devel harfbuzz-devel fontconfig-devel librsvg2-devel cairo-devel pango-devel libinput-devel \
- libarchive-devel libpng-devel libjpeg-turbo-devel pulseaudio-libs-devel pipewire-devel pam-devel poppler-glib-devel libseccomp-devel \
+ libarchive-devel libwebp-devel libXcursor-devel libpng-devel libjpeg-turbo-devel pulseaudio-libs-devel pipewire-devel pam-devel poppler-glib-devel libseccomp-devel \
mesa-libEGL-devel mesa-libGLES-devel glibc-devel \
pkgconf-pkg-config git python3 \
xorg-x11-server-Xwayland \
@@ -244,7 +244,7 @@ case "$FAMILY" in
opensuse)
deps="wlroots-devel wayland-devel wayland-protocols-devel libpixman-1-0-devel libxkbcommon-devel \
freetype2-devel harfbuzz-devel fontconfig-devel librsvg-devel cairo-devel pango-devel libinput-devel \
- libarchive-devel libpng16-devel libjpeg8-devel libpulse-devel pipewire-devel pam-devel libpoppler-glib-devel libseccomp-devel \
+ libarchive-devel libwebp-devel libXcursor-devel libpng16-devel libjpeg8-devel libpulse-devel pipewire-devel pam-devel libpoppler-glib-devel libseccomp-devel \
Mesa-libEGL-devel Mesa-libGLESv2-devel glibc-devel \
pkg-config git python3 \
xwayland \
@@ -253,7 +253,7 @@ case "$FAMILY" in
gentoo)
deps="gui-libs/wlroots dev-libs/wayland dev-libs/wayland-protocols x11-libs/pixman x11-libs/libxkbcommon \
media-libs/freetype media-libs/harfbuzz media-libs/fontconfig gnome-base/librsvg x11-libs/cairo x11-libs/pango dev-libs/libinput \
- app-arch/libarchive media-libs/libpng media-libs/libjpeg-turbo media-libs/libpulse media-video/pipewire sys-libs/pam \
+ app-arch/libarchive media-libs/libwebp x11-libs/libXcursor media-libs/libpng media-libs/libjpeg-turbo media-libs/libpulse media-video/pipewire sys-libs/pam \
media-libs/mesa \
virtual/pkgconfig dev-vcs/git dev-lang/python \
x11-base/xwayland \
diff --git a/scripts/pack-themes.sh b/scripts/pack-themes.sh
new file mode 100755
index 0000000..11bb849
--- /dev/null
+++ b/scripts/pack-themes.sh
@@ -0,0 +1,55 @@
+#!/bin/sh
+# Packs RediWM's built-in themes (assets/themes/*.toml) into shareable
+# .rediwm-theme zips, one per theme, using the built rediwm-theme helper.
+#
+# scripts/pack-themes.sh [--out DIR]
+#
+# Each preset becomes a pack directory: its TOML as theme.toml, plus the
+# wallpaper named in [assets] from assets/wallpapers/. The helper validates
+# every directory before it is zipped, so a broken preset fails here, not in
+# someone else's Appearance picker. DIR defaults to ./release/themes, which
+# is ignored by git. Build first: zig build
+set -eu
+
+here=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
+out="$here/release/themes"
+helper="$here/zig-out/bin/rediwm-theme"
+while [ $# -gt 0 ]; do
+ case "$1" in
+ --out) out=$2; shift ;;
+ *) echo "Usage: $0 [--out DIR]" >&2; exit 1 ;;
+ esac
+ shift
+done
+
+log() { printf '==> %s\n' "$*" >&2; }
+die() { printf 'error: %s\n' "$*" >&2; exit 1; }
+
+[ -x "$helper" ] || die "$helper is missing; run zig build first"
+mkdir -p "$out"
+out=$(CDPATH= cd -- "$out" && pwd)
+work=$(mktemp -d "${TMPDIR:-/tmp}/rediwm-themes.XXXXXX")
+trap 'rm -rf -- "$work"' EXIT HUP INT TERM
+
+for toml in "$here"/assets/themes/*.toml; do
+ id=$(sed -n 's/^id = "\(.*\)"$/\1/p' "$toml" | head -n 1)
+ [ -n "$id" ] || die "$toml has no [meta] id"
+ dir="$work/$id"
+ mkdir -p "$dir"
+ cp "$toml" "$dir/theme.toml"
+
+ # wallpaper = "name" under [assets] names a file in wallpapers/.
+ wallpaper=$(sed -n 's/^wallpaper = "\(.*\)"$/\1/p' "$toml" | head -n 1)
+ if [ -n "$wallpaper" ]; then
+ mkdir -p "$dir/wallpapers"
+ cp "$here/assets/wallpapers/$wallpaper" "$dir/wallpapers/$wallpaper"
+ fi
+
+ log "validate $id"
+ "$helper" validate "$dir"
+ rm -f -- "$out/$id.rediwm-theme"
+ log "pack $id -> $out/$id.rediwm-theme"
+ "$helper" pack "$dir" "$out/$id.rediwm-theme"
+ chmod 644 "$out/$id.rediwm-theme"
+done
+log "done"
diff --git a/scripts/release-verify.sh b/scripts/release-verify.sh
index 51f29ef..15494cd 100644
--- a/scripts/release-verify.sh
+++ b/scripts/release-verify.sh
@@ -52,7 +52,7 @@ log "Checking the installed files"
for bin in /usr/local/bin/rediwm /usr/local/bin/rediwm-*; do
readelf -d "$bin" 2>/dev/null | grep -E 'RUNPATH|RPATH' | grep -q "/work/" && die "$bin carries a build path in its RUNPATH"
done
-for bin in rediwm rediwm-msg rediwm-files rediwm-images rediwm-editor rediwm-pdf rediwm-share-picker rediwm-session rediwm-dm rediwm-accounts-helper; do
+for bin in rediwm rediwm-msg rediwm-theme rediwm-files rediwm-images rediwm-editor rediwm-pdf rediwm-share-picker rediwm-session rediwm-dm rediwm-accounts-helper; do
[ -x "/usr/local/bin/$bin" ] || die "/usr/local/bin/$bin is missing"
ldd "/usr/local/bin/$bin" 2>&1 | grep -q 'not found' && die "$bin has unresolved libraries"
done
diff --git a/src/Input.zig b/src/Input.zig
index f464ac6..2174f8a 100644
--- a/src/Input.zig
+++ b/src/Input.zig
@@ -505,7 +505,16 @@ pub fn cursorThemeName(input: *const Input) []const u8 {
/// Config reload: switch to a changed `cursor_theme`/`cursor_size`.
pub fn applyCursorTheme(input: *Input, theme: []const u8, size: u32) void {
- if (size == input.cursor_theme_size and std.mem.eql(u8, theme, input.cursor_theme_name[0..input.cursor_theme_len])) return;
+ applyCursorThemeImpl(input, theme, size, false);
+}
+
+/// An installed pack can replace cursor bytes without changing its name.
+pub fn reloadCursorTheme(input: *Input) void {
+ applyCursorThemeImpl(input, input.server.config.input.cursor_theme, input.server.config.input.cursor_size, true);
+}
+
+fn applyCursorThemeImpl(input: *Input, theme: []const u8, size: u32, force: bool) void {
+ if (!force and size == input.cursor_theme_size and std.mem.eql(u8, theme, input.cursor_theme_name[0..input.cursor_theme_len])) return;
const mgr = createCursorManager(theme, size) orelse {
log.warn("cursor theme '{s}' at size {d}: could not create manager", .{ theme, size });
return;
diff --git a/src/Server.zig b/src/Server.zig
index 71a6acd..6515c4f 100644
--- a/src/Server.zig
+++ b/src/Server.zig
@@ -162,6 +162,7 @@ battery_uevent_source: ?*wl.EventSource = null,
// forever, matching how a themeless/iconless desktop already renders (the
// hand-drawn fallback tiles in Taskbar.zig, no icon in the titlebar).
icon_service: ?*icon_service_mod.IconService = null,
+theme_job: ?*@import("config_runtime/theme_job.zig").Job = null,
icon_wake_source: ?*wl.EventSource = null,
scale_override: ?f32 = null,
@@ -394,6 +395,7 @@ pub fn init(server: *Server, scale: ?f32, icon_theme_cfg: icon_theme.Config, io:
loaded.desktop.enabled = false;
loaded.polkit.enable = false;
}
+ if (!greeter) @import("ui").shell_icons.configure(io, if (loaded.theme_pack) |p| p.root else "");
ui_theme.global = loaded.theme;
ui_theme.taskbar_override = if (loaded.taskbar_theme) |chosen| ui_theme.taskbarTokens(chosen) else null;
@import("ui").text.setPreferredFamilies(ui_theme.global.font, ui_theme.global.mono_font);
@@ -585,6 +587,7 @@ pub fn init(server: *Server, scale: ?f32, icon_theme_cfg: icon_theme.Config, io:
log.warn("init: could not start icon service, icons disabled: {}", .{err});
break :blk null;
};
+ @import("config_runtime/theme_pack.zig").configureIcons(server);
if (server.icon_service) |svc| {
server.icon_wake_source = server.wl_server.getEventLoop().addFd(*Server, svc.wakeFd(), .{ .readable = true }, handleIconWake, server) catch |err| blk: {
log.warn("init: could not register icon wake fd: {}", .{err});
@@ -693,9 +696,9 @@ fn loadGreeterConfig(io: std.Io, environ: std.process.Environ) !config_loader.Co
const allocator = @import("main.zig").gpa;
const path = if (environ.getPosix("REDIWM_CONFIG")) |p| (if (p.len > 0) p else null) else null;
const system = "/etc/rediwm/greeter.toml";
- if (path) |p| return config_loader.load(p, allocator, io, environ);
+ if (path) |p| return parseGreeterFile(p, allocator, io);
std.Io.Dir.cwd().access(io, system, .{}) catch return config_loader.default(allocator);
- return config_loader.load(system, allocator, io, environ);
+ return parseGreeterFile(system, allocator, io);
}
pub fn executeAction(server: *Server, action: config_actions.Action) void {
@@ -869,6 +872,8 @@ pub fn getSystemd(server: *Server) !*@import("systemd.zig").Client {
}
pub fn deinit(server: *Server) void {
+ if (server.theme_job) |job| job.deinit();
+ server.theme_job = null;
server.undo.clear();
server.undo.applying = true;
// terminate saved the layout before leaving the event loop. Only paths
@@ -1297,6 +1302,7 @@ pub fn syncDesktop(server: *Server) void {
log.err("desktop: {}", .{err});
break :blk null;
};
+ if (server.desktop) |desktop| desktop.app.worker.updateTheme(server.icon_theme_cfg);
}
/// Shows the control center's Appearance page on the output under the cursor.
@@ -1581,7 +1587,7 @@ pub fn reloadWallpaper(server: *Server) void {
fn loadWallpaper(server: *Server, delay_ns: u64) void {
const gpa = @import("main.zig").gpa;
- const path = wallpapers.resolve(gpa, server.io, server.config.compositor.wallpaper) catch |err| {
+ const path = @import("config_runtime/theme_pack.zig").wallpaperPath(server, gpa) catch |err| {
log.warn("wallpaper '{s}': {}", .{ server.config.compositor.wallpaper, err });
return;
};
@@ -1720,3 +1726,9 @@ fn polkitState(owner: ?*anyopaque, state: polkit_mod.Agent.State) void {
_ = mgr.postNotification("Authentication", 0, "", "Authentication agent unavailable", "Could not register with polkit. Another authentication agent may already be running.", &.{}, 1, false, true, 6000, "", null) catch {};
}
}
+
+fn parseGreeterFile(path: []const u8, a: std.mem.Allocator, io: std.Io) !config_loader.Config {
+ const bytes = try std.Io.Dir.cwd().readFileAlloc(io, path, a, .limited(1 << 20));
+ defer a.free(bytes);
+ return config_loader.parse(a, bytes, path);
+}
diff --git a/src/Toplevel.zig b/src/Toplevel.zig
index eb8b98e..7a2879c 100644
--- a/src/Toplevel.zig
+++ b/src/Toplevel.zig
@@ -215,8 +215,19 @@ move_y: anim.Anim = .{},
/// see it, and it is never folded into `move_x`/`move_y`.
dodge_x: anim.Anim = .{},
dodge_y: anim.Anim = .{},
+/// Workspace switch (`workspaces.zig`): an offset in world units and a fade,
+/// presentation only like `dodge_*`. A window whose workspace was hidden keeps
+/// its frame shown, inert, until they settle (`switch_leaving`).
+switch_x: anim.Anim = .{},
+switch_y: anim.Anim = .{},
+switch_fade: anim.Anim = .{ .from = 1, .to = 1, .property = .opacity },
+switch_leaving: bool = false,
size_w: anim.Anim = .{},
size_h: anim.Anim = .{},
+/// The size request `size_w`/`size_h` ease toward. Once the client has answered
+/// it, a settled animation gives way to the size the client took (one that
+/// cannot fit is never clipped to a frame it refused).
+size_wait: ConfigureWait = .none,
// Last clip handed to `wlr_scene_subsurface_tree_set_clip`, so an unchanged
// clip is not re-applied. `applySizeClip` runs from `syncChrome`, i.e. on
// every client commit, and wlroots walks the whole subsurface tree on each
@@ -269,6 +280,9 @@ auto_float: bool = false,
auto_float_override: ?bool = null,
auto_seen: ?@import("auto_tiling.zig").State = null,
auto_reinsert: ?@import("auto_layout.zig").Placement = null,
+/// The window that had focus on this one's workspace when it joined it: a new
+/// tile splits that window's tile. Cleared once the window is in the tree.
+auto_anchor: ?u64 = null,
tab_resume_group: u64 = 0,
tab_resume_restore: ?RestoreGeometry = null,
// Manual half/quarter tile and the floating geometry to return to.
@@ -1474,10 +1488,18 @@ pub fn finishSizeAnimation(toplevel: *Toplevel) void {
pub fn requestSizeAnimated(toplevel: *Toplevel, width: i32, height: i32) ConfigureWait {
const wait = toplevel.requestSize(width, height);
- if (!toplevel.in_world or toplevel.isResizing()) return wait;
+ toplevel.animateChromeSize(width, height, wait);
+ return wait;
+}
+
+/// Eases the frame toward a client size already requested (`wait`), clipping
+/// the client to it while the client catches up.
+fn animateChromeSize(toplevel: *Toplevel, width: i32, height: i32, wait: ConfigureWait) void {
+ if (!toplevel.in_world or toplevel.isResizing()) return;
+ toplevel.size_wait = wait;
const now_ms = nowMs();
const target = chromeSizeForClient(toplevel, width, height);
- if (target.w <= 0 or target.h <= 0) return wait;
+ if (target.w <= 0 or target.h <= 0) return;
if (!toplevel.size_w.active() and toplevel.size_w.settle_ms == 0) {
const cur_w: f32 = @floatFromInt(if (toplevel.chrome_width > 0) toplevel.chrome_width else target.w);
toplevel.size_w = .{ .from = cur_w, .to = cur_w };
@@ -1495,7 +1517,6 @@ pub fn requestSizeAnimated(toplevel: *Toplevel, width: i32, height: i32) Configu
} else {
toplevel.server.scheduleFrames();
}
- return wait;
}
fn chromeSizeForClient(toplevel: *const Toplevel, client_w: i32, client_h: i32) struct { w: i32, h: i32 } {
@@ -1514,7 +1535,7 @@ fn ignoreCloseInput(_: *wlr.SceneBuffer, _: *f64, _: *f64) callconv(.c) bool {
pub fn applyVisualTransform(toplevel: *Toplevel, now_ms: i64) void {
const zoom_scale = toplevel.worldScale();
if (toplevel.in_world and !toplevel.closing) {
- toplevel.frame_tree.node.setEnabled(@import("window_tabs.zig").visible(toplevel) and toplevel.cameraFocusOpacity() > 0);
+ toplevel.frame_tree.node.setEnabled(toplevel.switch_leaving or (@import("window_tabs.zig").visible(toplevel) and toplevel.cameraFocusOpacity() > 0));
}
// Open keeps tree zoom at the logical window zoom so scene picking and
// client-local coordinates stay 1:1 with the mapped frame (existing
@@ -1526,12 +1547,12 @@ pub fn applyVisualTransform(toplevel: *Toplevel, now_ms: i64) void {
1.0;
_ = @import("projection.zig").setTreeZoom(&toplevel.frame_tree.node, zoom_scale * factor);
toplevel.frame_tree.node.setPosition(
- visualX(toplevel, now_ms) + dodgeOffset(toplevel.dodge_x, now_ms),
- visualY(toplevel, now_ms) + dodgeOffset(toplevel.dodge_y, now_ms),
+ visualX(toplevel, now_ms) + animOffset(toplevel.dodge_x, now_ms) + animOffset(toplevel.switch_x, now_ms),
+ visualY(toplevel, now_ms) + animOffset(toplevel.dodge_y, now_ms) + animOffset(toplevel.switch_y, now_ms),
);
}
-fn dodgeOffset(a: anim.Anim, now_ms: i64) i32 {
+fn animOffset(a: anim.Anim, now_ms: i64) i32 {
if (!a.active()) return 0;
return @intFromFloat(@round(a.value(now_ms)));
}
@@ -1575,6 +1596,69 @@ pub fn tickDodge(toplevel: *Toplevel, now_ms: i64) bool {
return true;
}
+/// Brings the window in with its workspace: from (`from_x`, `from_y`) world
+/// units away, faded out with `fade`, or from where it is when it was leaving.
+pub fn switchIn(toplevel: *Toplevel, from_x: f32, from_y: f32, fade: bool) void {
+ if (!toplevel.switch_leaving) {
+ toplevel.switch_x = .{ .from = from_x, .to = from_x };
+ toplevel.switch_y = .{ .from = from_y, .to = from_y };
+ const start: f32 = if (fade) 0 else 1;
+ toplevel.switch_fade = .{ .from = start, .to = start, .property = .opacity };
+ }
+ toplevel.setSwitchLeaving(false);
+ toplevel.retargetSwitch(0, 0, 1);
+}
+
+/// Takes the window out with the workspace it is on, which is already hidden:
+/// it stays shown, inert, until it reaches (`to_x`, `to_y`) or has faded.
+pub fn switchOut(toplevel: *Toplevel, to_x: f32, to_y: f32, fade: bool) void {
+ toplevel.setSwitchLeaving(true);
+ toplevel.retargetSwitch(to_x, to_y, if (fade) 0 else 1);
+}
+
+fn retargetSwitch(toplevel: *Toplevel, x: f32, y: f32, opacity: f32) void {
+ const now_ms = nowMs();
+ const curve = anim.curveFor(.camera_desktop);
+ toplevel.switch_x.retargetTo(now_ms, x, curve);
+ toplevel.switch_y.retargetTo(now_ms, y, curve);
+ toplevel.switch_fade.retargetTo(now_ms, opacity, curve);
+ if (!toplevel.tickSwitch(now_ms)) return;
+ toplevel.applyVisualTransform(now_ms);
+ toplevel.applyOpacity(now_ms);
+ toplevel.server.scheduleFrames();
+}
+
+fn setSwitchLeaving(toplevel: *Toplevel, leaving: bool) void {
+ if (toplevel.switch_leaving == leaving) return;
+ toplevel.switch_leaving = leaving;
+ _ = projection.setTreeInert(&toplevel.frame_tree.node, leaving);
+}
+
+/// Ends a workspace switch at once; a window that was leaving is hidden.
+pub fn finishSwitch(toplevel: *Toplevel) void {
+ if (!toplevel.switch_x.active() and !toplevel.switch_y.active() and !toplevel.switch_fade.active() and !toplevel.switch_leaving) return;
+ toplevel.switch_x.cancel(0);
+ toplevel.switch_y.cancel(0);
+ toplevel.switch_fade.cancel(1);
+ toplevel.setSwitchLeaving(false);
+ if (!toplevel.in_world) return;
+ const now_ms = nowMs();
+ toplevel.applyVisualTransform(now_ms);
+ toplevel.applyOpacity(now_ms);
+}
+
+pub fn tickSwitch(toplevel: *Toplevel, now_ms: i64) bool {
+ if (!toplevel.switch_x.active() and !toplevel.switch_y.active() and !toplevel.switch_fade.active() and !toplevel.switch_leaving) return false;
+ _ = toplevel.switch_x.sampleChanged(now_ms, anim.quantum_px);
+ _ = toplevel.switch_y.sampleChanged(now_ms, anim.quantum_px);
+ _ = toplevel.switch_fade.sampleChanged(now_ms, anim.quantum_alpha);
+ if (toplevel.switch_x.settled(now_ms) and toplevel.switch_y.settled(now_ms) and toplevel.switch_fade.settled(now_ms)) {
+ toplevel.finishSwitch();
+ return false;
+ }
+ return true;
+}
+
pub fn tickMove(toplevel: *Toplevel, now_ms: i64) bool {
if (!toplevel.move_x.active() and !toplevel.move_y.active()) return false;
_ = toplevel.move_x.sampleChanged(now_ms, anim.quantum_px);
@@ -1593,7 +1677,8 @@ pub fn tickSize(toplevel: *Toplevel, now_ms: i64) bool {
const quantum = anim.rasterPixelQuantum(toplevel.render_scale);
const w_changed = toplevel.size_w.sampleChanged(now_ms, quantum);
const h_changed = toplevel.size_h.sampleChanged(now_ms, quantum);
- if (w_changed or h_changed) {
+ // At rest the frame may give way to the size the client took.
+ if (w_changed or h_changed or !moving) {
toplevel.syncChrome(true, now_ms) catch |err| {
log.err("tickSize: could not update window decoration: {}", .{err});
};
@@ -2049,6 +2134,7 @@ pub fn handleSurfaceCommit(toplevel: *Toplevel) void {
if (toplevel.kde_decoration) |decoration| decoration.commit();
if (toplevel.decoration) |decoration| decoration.applyMode();
+ if (toplevel.size_wait == .x11_commit or toplevel.configureCompleted(toplevel.size_wait)) toplevel.size_wait = .none;
if (toplevel.server.input.resize_session) |*session| {
if (session.toplevel == toplevel) {
if (session.outstanding_configure == .x11_commit) {
@@ -2126,6 +2212,7 @@ pub fn handleMapped(toplevel: *Toplevel) void {
toplevel.auto_float = ph_top.auto_float;
toplevel.auto_restore = ph_top.auto_restore;
toplevel.auto_reinsert = ph_top.auto_reinsert;
+ toplevel.auto_anchor = ph_top.auto_anchor;
const ph = &ph_top.backend.placeholder;
ph.matched = true;
ph_token = ph.token;
@@ -2276,6 +2363,7 @@ pub fn handleUnmapped(toplevel: *Toplevel) void {
toplevel.in_world = false;
toplevel.needs_attention = false;
toplevel.detachInput();
+ toplevel.finishSwitch();
const keep_scene = if (was_tab or !@import("workspaces.zig").visible(toplevel)) false else toplevel.beginCloseAnimation();
if (!keep_scene) {
toplevel.clearChromeCache();
@@ -2456,7 +2544,8 @@ pub fn isResizing(toplevel: *Toplevel) bool {
pub fn isGeometrySettled(toplevel: *Toplevel, now_ms: i64) bool {
if (toplevel.isResizing()) return false;
return toplevel.move_x.settled(now_ms) and toplevel.move_y.settled(now_ms) and
- toplevel.size_w.settled(now_ms) and toplevel.size_h.settled(now_ms);
+ toplevel.size_w.settled(now_ms) and toplevel.size_h.settled(now_ms) and
+ toplevel.switch_x.settled(now_ms) and toplevel.switch_y.settled(now_ms);
}
pub fn chromeAcceptsInput(buffer: *wlr.SceneBuffer, sx: *f64, sy: *f64) callconv(.c) bool {
@@ -2630,7 +2719,7 @@ pub fn syncChrome(toplevel: *Toplevel, rebuild_shadow: bool, now_ms: i64) !void
toplevel.chrome_height = height;
const title_memo = chrome.TitlebarMemo.capture(width, height, toplevel.titlePtr(), state);
- const skip_titlebar = if (toplevel.last_titlebar) |prev| prev.eql(title_memo) else false;
+ const skip_titlebar = if (toplevel.last_titlebar) |prev| prev.eql(title_memo) or toplevel.stretchesTitlebar(prev, title_memo, now_ms) else false;
if (!skip_titlebar) {
const titlebar = if (toplevel.cached_titlebar != null and toplevel.last_titlebar != null and toplevel.last_titlebar.?.reusableFor(title_memo))
try chrome.ChromeBuffer.createUpdated(toplevel.cached_titlebar.?, state, toplevel.last_titlebar.?.title_ptr != title_memo.title_ptr)
@@ -2660,13 +2749,34 @@ pub fn syncChrome(toplevel: *Toplevel, rebuild_shadow: bool, now_ms: i64) !void
applySizeClip(toplevel);
}
+/// How far an easing frame stretches its titlebar raster before rastering anew.
+const titlebar_stretch: f32 = 0.12;
+
+/// Whether a frame easing to a new size keeps its titlebar raster, stretched,
+/// instead of rastering it for every frame (`ChromeBuffer.create` costs
+/// milliseconds, and a reflow eases several frames at once): only the size
+/// changed, the width by at most `titlebar_stretch`. The band does not depend
+/// on the height, and the settled size always rasters exactly.
+fn stretchesTitlebar(toplevel: *const Toplevel, raster: chrome.TitlebarMemo, next: chrome.TitlebarMemo, now_ms: i64) bool {
+ if (toplevel.size_w.settle_ms == 0 and toplevel.size_h.settle_ms == 0) return false;
+ if (toplevel.size_w.settled(now_ms) and toplevel.size_h.settled(now_ms)) return false;
+ var resized = raster;
+ resized.width = next.width;
+ resized.height = next.height;
+ if (!resized.eql(next)) return false;
+ const ratio = @as(f32, @floatFromInt(next.width)) / @as(f32, @floatFromInt(@max(raster.width, 1)));
+ return @abs(ratio - 1) <= titlebar_stretch;
+}
+
fn visualChromeSize(toplevel: *Toplevel, now_ms: i64, natural_w: i32, natural_h: i32) struct { w: i32, h: i32 } {
if (toplevel.size_w.settle_ms == 0 and toplevel.size_h.settle_ms == 0) {
return .{ .w = natural_w, .h = natural_h };
}
const w: i32 = @intFromFloat(@round(toplevel.size_w.value(now_ms)));
const h: i32 = @intFromFloat(@round(toplevel.size_h.value(now_ms)));
- if (toplevel.size_w.settled(now_ms) and toplevel.size_h.settled(now_ms) and w == natural_w and h == natural_h) {
+ if (toplevel.size_w.settled(now_ms) and toplevel.size_h.settled(now_ms) and
+ ((w == natural_w and h == natural_h) or toplevel.size_wait == .none))
+ {
toplevel.size_w.cancel(@floatFromInt(natural_w));
toplevel.size_h.cancel(@floatFromInt(natural_h));
return .{ .w = natural_w, .h = natural_h };
@@ -2799,7 +2909,7 @@ pub fn effectiveOpacity(toplevel: *Toplevel, now_ms: i64) f32 {
}
pub fn applyOpacity(toplevel: *Toplevel, now_ms: i64) void {
- var opacity = std.math.clamp(toplevel.effectiveOpacity(now_ms) * toplevel.map_opacity.value(now_ms), 0, 1);
+ var opacity = std.math.clamp(toplevel.effectiveOpacity(now_ms) * toplevel.map_opacity.value(now_ms) * toplevel.switch_fade.value(now_ms), 0, 1);
toplevel.frame_tree.node.forEachBuffer(*f32, struct {
fn iter(buffer: *wlr.SceneBuffer, _: c_int, _: c_int, value: *f32) void {
buffer.setOpacity(value.*);
@@ -2936,6 +3046,7 @@ pub fn minimize(toplevel: *Toplevel) void {
if (toplevel.minimized or !toplevel.in_world) return;
toplevel.minimized = true;
toplevel.detachInput();
+ toplevel.finishSwitch();
toplevel.frame_tree.node.setEnabled(false);
const server = toplevel.server;
@@ -3451,7 +3562,9 @@ pub fn setTiledOn(toplevel: *Toplevel, output: *Output, tile: tiling.Tile) void
/// Arbitrary automatic frame rectangle. Only changed targets configure a client;
/// replies to an earlier configure never trigger another layout pass.
-pub fn setAutoTile(toplevel: *Toplevel, rect: wlr.Box) void {
+/// `animate` glides the frame to the tile like other compositor-owned geometry;
+/// a window still opening takes its first tile at once.
+pub fn setAutoTile(toplevel: *Toplevel, rect: wlr.Box, animate: bool) void {
if (!toplevel.in_world or toplevel.fullscreen or toplevel.maximized) return;
const footer = if (toplevel.hasServerDecorations()) chrome.frame_border else 0;
const target: RestoreGeometry = .{
@@ -3460,10 +3573,12 @@ pub fn setAutoTile(toplevel: *Toplevel, rect: wlr.Box) void {
.width = @max(1, rect.width - 2 * toplevel.borderWidth()),
.height = @max(1, rect.height - toplevel.titlebarHeight() - footer),
};
- toplevel.finishSizeAnimation();
+ // An unchanged tile keeps a glide in flight (an earlier reflow, a restore).
if (toplevel.auto_target) |previous| if (std.meta.eql(previous, target)) return;
- if (toplevel.auto_restore == null) toplevel.auto_restore = toplevel.rememberGeometry();
const was_tiled = toplevel.auto_target != null;
+ const glide = animate and (was_tiled or !toplevel.map_motion.active());
+ if (!glide) toplevel.finishSizeAnimation();
+ if (toplevel.auto_restore == null) toplevel.auto_restore = toplevel.rememberGeometry();
toplevel.auto_target = target;
toplevel.pending_restore = null;
toplevel.clearZoomBoost();
@@ -3471,8 +3586,9 @@ pub fn setAutoTile(toplevel: *Toplevel, rect: wlr.Box) void {
const moved = toplevel.x != target.x or toplevel.y != target.y;
// X11 sends position and size together: commitPosition uses auto_target,
// never the old client buffer size, and already configures a moved window.
- toplevel.setPosition(target.x, target.y);
- if (toplevel.backend != .xwayland or !moved) _ = toplevel.requestSize(target.width, target.height);
+ if (glide) toplevel.setPositionAnimated(target.x, target.y) else toplevel.setPosition(target.x, target.y);
+ const wait: ConfigureWait = if (toplevel.backend != .xwayland or !moved) toplevel.requestSize(target.width, target.height) else .x11_commit;
+ if (glide) toplevel.animateChromeSize(target.width, target.height, wait);
toplevel.notifyLayoutChanged();
}
diff --git a/src/World.zig b/src/World.zig
index 1e494a6..e384b2f 100644
--- a/src/World.zig
+++ b/src/World.zig
@@ -278,6 +278,7 @@ pub fn tickHover(world: *World, now_ms: i64) bool {
if (toplevel.tickMap(now_ms)) animating = true;
if (toplevel.tickMove(now_ms)) animating = true;
if (toplevel.tickDodge(now_ms)) animating = true;
+ if (toplevel.tickSwitch(now_ms)) animating = true;
if (toplevel.tickSize(now_ms)) animating = true;
toplevel.applyVisualTransform(now_ms);
if (target == null and toplevel.peek_mix.to != 0) {
diff --git a/src/auto_layout.zig b/src/auto_layout.zig
index 9e981b6..984cd7e 100644
--- a/src/auto_layout.zig
+++ b/src/auto_layout.zig
@@ -13,6 +13,9 @@ pub const Member = struct {
min_height: i32 = 1,
max_width: i32 = 0,
max_height: i32 = 0,
+ /// Where a new member goes: this placed leaf is split. Without one, or when
+ /// it has no tile, the member splits the leaf admitted before it.
+ anchor: ?Key = null,
};
pub const Axis = enum { horizontal, vertical };
pub const Direction = enum { left, right, up, down };
@@ -310,9 +313,10 @@ pub const Tree = struct {
var beside: ?Key = null;
for (members) |member| {
if (!tree.contains(member.key)) {
+ const at = if (member.anchor) |anchor| (if (tree.rectangle(anchor) != null) anchor else beside) else beside;
var rect = usable;
- if (beside) |key| rect = tree.rectangle(key) orelse usable;
- try tree.insert(allocator, member, beside, if (rect.width >= rect.height) .horizontal else .vertical);
+ if (at) |key| rect = tree.rectangle(key) orelse usable;
+ try tree.insert(allocator, member, at, if (rect.width >= rect.height) .horizontal else .vertical);
tree.arrange(members, usable, requested_gap);
}
if (tree.rectangle(member.key) != null) beside = member.key;
@@ -388,6 +392,26 @@ test "rotation, resizing, swapping and bounded clients" {
try testing.expect(!tree.contains(members[0].key));
}
+test "a new member splits its anchor, else the member before it" {
+ var tree: Tree = .{};
+ defer tree.deinit(testing.allocator);
+ var members = [_]Member{ .{ .key = .{ .id = 1 }, .order = 1 }, .{ .key = .{ .id = 2 }, .order = 2 }, .{ .key = .{ .id = 3 }, .order = 3, .anchor = .{ .id = 1 } } };
+ try tree.sync(testing.allocator, members[0..2], screen, 8);
+ const second = tree.rectangle(members[1].key).?;
+ try tree.sync(testing.allocator, &members, screen, 8);
+ // The tall left tile splits top/bottom; the right one keeps its tile.
+ const first = tree.rectangle(members[0].key).?;
+ const third = tree.rectangle(members[2].key).?;
+ try testing.expectEqual(second, tree.rectangle(members[1].key).?);
+ try testing.expectEqual(first.x, third.x);
+ try testing.expectEqual(first.y + first.height + 8, third.y);
+ // An anchor without a tile falls back to the member admitted before.
+ members[0].active = false;
+ var fourth = [_]Member{ members[0], members[1], members[2], .{ .key = .{ .id = 4 }, .order = 4, .anchor = .{ .id = 1 } } };
+ try tree.sync(testing.allocator, &fourth, screen, 8);
+ try testing.expectEqual(tree.placement(fourth[3].key).?.anchor, members[2].key);
+}
+
test "insertion allocation failures preserve the original leaf" {
const Case = struct {
fn run(allocator: Allocator) !void {
diff --git a/src/auto_tiling.zig b/src/auto_tiling.zig
index ee2924a..751fcba 100644
--- a/src/auto_tiling.zig
+++ b/src/auto_tiling.zig
@@ -97,6 +97,9 @@ pub const Manager = struct {
trees: [@import("workspaces.zig").count]layout.Tree = @splat(.{}),
idle: ?*wl.EventSource = null,
applying: bool = false,
+ /// The next flush places tiles at once instead of gliding: entering the
+ /// mode, output changes and restored layouts are not user rearrangements.
+ quiet: bool = false,
pub fn deinit(self: *Manager) void {
if (self.idle) |source| source.remove();
@@ -119,6 +122,7 @@ pub const Manager = struct {
if (!server.world.workspaces.active) return;
self.applying = true;
defer self.applying = false;
+ defer self.quiet = false;
self.reflow(server) catch |err| {
std.log.warn("automatic layout: {s}", .{@errorName(err)});
return;
@@ -137,6 +141,9 @@ pub const Manager = struct {
}.less);
var members: std.ArrayList(layout.Member) = .empty;
defer members.deinit(gpa);
+ // A live split drag follows the pointer exactly.
+ const dragging = if (server.input.tiling_grab) |grab| grab.kind == .resize else false;
+ const animate = !self.quiet and !dragging;
for (&self.trees, 0..) |*tree, index| {
members.clearRetainingCapacity();
const output = server.world.workspaces.slots[index].output;
@@ -152,6 +159,7 @@ pub const Manager = struct {
.min_height = @max(1, s.constraints.min_height) +| s.vertical,
.max_width = if (s.constraints.max_width > 0) s.constraints.max_width +| s.horizontal else 0,
.max_height = if (s.constraints.max_height > 0) s.constraints.max_height +| s.vertical else 0,
+ .anchor = anchorOf(top),
};
if (s.constraints.control_min_width > s.constraints.min_width and
(s.constraints.max_width == 0 or s.constraints.control_min_width <= s.constraints.max_width))
@@ -193,9 +201,11 @@ pub const Manager = struct {
for (tops.items) |top| {
if (top.workspace_id != index + 1) continue;
const s = state(top);
+ // Used by the sync above, or moot for a window that floats.
+ top.auto_anchor = null;
if (!s.excluded and !s.suspended and !s.hidden) {
if (tree.rectangle(key(top))) |rect| {
- top.setAutoTile(.{ .x = rect.x, .y = rect.y, .width = rect.width, .height = rect.height });
+ top.setAutoTile(.{ .x = rect.x, .y = rect.y, .width = rect.width, .height = rect.height }, animate and @import("workspaces.zig").visible(top));
} else top.clearAutoTile(true);
} else if (s.excluded) top.clearAutoTile(true);
top.auto_seen = state(top);
@@ -204,6 +214,14 @@ pub const Manager = struct {
}
};
+/// The tile a window joining the tree splits: the window that had focus on
+/// its workspace when it joined.
+fn anchorOf(top: *Top) ?layout.Key {
+ const other = top.server.findToplevelById(top.auto_anchor orelse return null) orelse return null;
+ if (other == top or other.workspace_id != top.workspace_id) return null;
+ return key(other);
+}
+
fn boundedMin(a: i32, b: i32) i32 {
return if (a == 0) b else if (b == 0) a else @min(a, b);
}
diff --git a/src/config/loader.zig b/src/config/loader.zig
index 7e29469..3eb9c80 100644
--- a/src/config/loader.zig
+++ b/src/config/loader.zig
@@ -171,6 +171,7 @@ pub const CompositorConfig = struct {
/// Empty for RediWM's own, a file name in the wallpaper directories, or a
/// path; see `wallpapers.zig`.
wallpaper: []const u8 = "",
+ icon_theme: []const u8 = "",
sound_theme: []const u8 = "freedesktop",
sound_enabled: bool = true,
sound_disabled_events: []const []const u8 = &.{},
@@ -263,6 +264,11 @@ pub const NotificationRule = struct {
pub const Config = struct {
theme: Theme = .{},
+ theme_base: []const u8 = "",
+ theme_defaults: Theme = .{},
+ /// Effective config layer before REDIWM_THEME, for saving a small overlay.
+ theme_config: Theme = .{},
+ theme_pack: ?@import("theme_pack.zig").Pack = null,
/// `[taskbar_theme]`: the taskbar's own colours over the main theme's.
/// Null (no section) follows the main theme. Only taskbar tokens are set.
taskbar_theme: ?Theme = null,
@@ -334,9 +340,13 @@ pub const resolvePath = @import("path.zig").resolvePath;
/// section and any leading comments. Used by the control center so appearance
/// edits don't clobber keybinds/input.
pub fn replaceThemeSection(allocator: Allocator, io: Io, path: []const u8, t: Theme) void {
+ replaceThemeOverrides(allocator, io, path, t, .{}, "");
+}
+
+pub fn replaceThemeOverrides(allocator: Allocator, io: Io, path: []const u8, t: Theme, defaults: Theme, base: []const u8) void {
var buf: std.ArrayList(u8) = .empty;
defer buf.deinit(allocator);
- theme_mod.writeInto(allocator, &buf, t) catch return;
+ theme_mod.writeOverrides(allocator, &buf, t, defaults, base) catch return;
rewriteSection(allocator, io, path, "[theme]", buf.items);
}
@@ -452,11 +462,46 @@ pub fn loadFromBytes(
};
errdefer cfg.deinit();
+ if (cfg.theme_base.len > 0) {
+ const a = cfg.arena.allocator();
+ cfg.theme_pack = @import("theme_pack.zig").find(a, io, environ, path, cfg.theme_base) catch null;
+ if (cfg.theme_pack) |p| {
+ cfg.theme_defaults = p.tokens;
+ cfg.theme = p.tokens;
+ try theme_mod.overlay(a, &cfg.theme, bytes);
+ if (cfg.taskbar_theme == null) cfg.taskbar_theme = p.taskbar;
+ if (p.color_scheme) |dark| cfg.compositor.dark_mode = dark;
+ if (p.cursor_theme.len > 0) {
+ cfg.input.cursor_theme = if (std.mem.eql(u8, p.cursor_theme, "pack"))
+ try std.fmt.allocPrint(a, "rediwm-{s}-cursors", .{p.id})
+ else
+ p.cursor_theme;
+ }
+ } else log.warn("theme pack '{s}' is missing or invalid; using defaults", .{cfg.theme_base});
+ }
+ cfg.theme_config = cfg.theme;
if (theme_mod.resolvePath(environ)) |theme_path| {
overlayThemeFile(cfg.arena.allocator(), io, &cfg.theme, theme_path) catch |err| {
log.warn("REDIWM_THEME overlay '{s}': {}", .{ theme_path, err });
};
}
+ if (cfg.theme_pack != null) {
+ var section: []const u8 = "";
+ var lines = std.mem.splitScalar(u8, bytes, '\n');
+ while (lines.next()) |raw| {
+ const line = theme_mod.stripComment(std.mem.trim(u8, raw, " \t\r"));
+ if (line.len == 0) continue;
+ if (line[0] == '[') {
+ section = line;
+ continue;
+ }
+ const eq = std.mem.indexOfScalar(u8, line, '=') orelse continue;
+ const key = std.mem.trim(u8, line[0..eq], " \t");
+ const value = std.mem.trim(u8, line[eq + 1 ..], " \t");
+ if (std.mem.eql(u8, section, "[compositor]") and std.mem.eql(u8, key, "dark_mode")) cfg.compositor.dark_mode = std.mem.eql(u8, value, "true");
+ if (std.mem.eql(u8, section, "[input]") and std.mem.eql(u8, key, "cursor_theme")) cfg.input.cursor_theme = try cfg.arena.allocator().dupe(u8, try theme_mod.unquote(value));
+ }
+ }
finishCompositor(&cfg);
return cfg;
}
@@ -522,6 +567,12 @@ pub fn parse(allocator: Allocator, bytes: []const u8, path: []const u8) !Config
switch (section) {
.none => {},
.theme => {
+ if (std.mem.eql(u8, key, "base")) {
+ const id = try theme_mod.unquote(value);
+ if (id.len > 0 and !@import("theme_pack.zig").validId(id)) return error.InvalidConfig;
+ cfg.theme_base = try cfg.arena.allocator().dupe(u8, id);
+ continue;
+ }
theme_mod.applyKey(cfg.arena.allocator(), &cfg.theme, key, value) catch |err| {
fail(path, line_no, "invalid theme field '{s}': {s}", .{ key, @errorName(err) });
return error.InvalidConfig;
@@ -986,6 +1037,7 @@ const compositor_rules: std.enums.EnumFieldStruct(std.meta.FieldEnum(CompositorC
.floating_apps = .json_string_list,
.taskbar_items = .taskbar_items,
.taskbar_position = .enumeration,
+ .icon_theme = .string,
.window_tab_apps = .json_string_list,
.default_file_manager = .string,
.default_terminal = .string,
@@ -2246,3 +2298,45 @@ test "workspace preset is independent, overrides include noop, and mode preserve
try std.testing.expectEqualStrings("custom-canvas", cfg.lookupKeybind(q.modifiers, q.sym).?.spawn);
try std.testing.expectEqual(@as(?Action, null), cfg.lookupKeybind(two.modifiers, two.sym));
}
+
+test "no base preserves legacy themes and embedded base layers config overrides" {
+ const a = std.testing.allocator;
+ const bytes = "[theme]\naccent = \"#123456\"\nfont_size = 14\n";
+ var old = try parse(a, bytes, "legacy");
+ defer old.deinit();
+ var loaded = try loadFromBytes(a, bytes, "legacy", .empty, std.testing.io);
+ defer loaded.deinit();
+ try std.testing.expect(themeEql(old.theme, loaded.theme));
+ var based = try loadFromBytes(a, "[theme]\nbase = \"rediwm-light\"\nfont_size = 14\n", "based", .empty, std.testing.io);
+ defer based.deinit();
+ try std.testing.expectEqualStrings("rediwm-light", based.theme_base);
+ try std.testing.expectEqual(@as(f32, 14), based.theme.font_size);
+ try std.testing.expect(themeEql(based.theme_defaults, based.theme_pack.?.tokens));
+ try std.testing.expectEqual(based.theme_defaults.accent, based.theme.accent);
+}
+
+test "external overlay wins over a referenced pack without pinning inherited tokens" {
+ const a = std.testing.allocator;
+ const io = std.testing.io;
+ var tmp = std.testing.tmpDir(.{});
+ defer tmp.cleanup();
+ var arena = std.heap.ArenaAllocator.init(a);
+ defer arena.deinit();
+ const mem = arena.allocator();
+ const root = try tmp.dir.realPathFileAlloc(io, ".", mem);
+ const path = try std.fs.path.join(mem, &.{ root, "overlay.toml" });
+ try tmp.dir.writeFile(io, .{ .sub_path = "overlay.toml", .data = "[theme]\nfont_size = 16\n" });
+ const entry = try std.fmt.allocPrintSentinel(mem, "REDIWM_THEME={s}", .{path}, 0);
+ const entries = [_:null]?[*:0]const u8{entry.ptr};
+ const env: std.process.Environ = .{ .block = .{ .slice = &entries } };
+ var cfg = try loadFromBytes(a, "[theme]\nbase = \"rediwm-light\"\nfont_size = 14\n", "test", env, io);
+ defer cfg.deinit();
+ try std.testing.expectEqual(@as(f32, 16), cfg.theme.font_size);
+ try std.testing.expectEqual(@as(f32, 14), cfg.theme_config.font_size);
+ var edited = cfg.theme;
+ edited.font_size = 17;
+ try theme_mod.saveOverlay(a, io, path, edited, cfg.theme_config);
+ const saved = try tmp.dir.readFileAlloc(io, "overlay.toml", a, .limited(4096));
+ defer a.free(saved);
+ try std.testing.expectEqualStrings("[theme]\nfont_size = 17\n", saved);
+}
diff --git a/src/config/mod.zig b/src/config/mod.zig
index 6f54b47..912b332 100644
--- a/src/config/mod.zig
+++ b/src/config/mod.zig
@@ -15,6 +15,7 @@ pub const schedule = @import("schedule.zig");
pub const setting_save = @import("setting_save.zig");
pub const shortcut_save = @import("shortcut_save.zig");
pub const taskbar_items = @import("taskbar_items.zig");
+pub const theme_pack = @import("theme_pack.zig");
pub const types = @import("types.zig");
pub const workspace_layout = @import("workspace_layout.zig");
pub const window_rules = @import("window_rules.zig");
diff --git a/src/config/theme_pack.zig b/src/config/theme_pack.zig
new file mode 100644
index 0000000..b4dbed2
--- /dev/null
+++ b/src/config/theme_pack.zig
@@ -0,0 +1,281 @@
+//! Theme directories and legacy TOML presets. All returned memory belongs to
+//! the caller's arena. Discovery is explicit: startup, reload, or picker open.
+const std = @import("std");
+const theme = @import("ui").theme;
+const presets = @import("ui").theme_presets;
+const A = std.mem.Allocator;
+const Io = std.Io;
+
+pub const Pack = struct {
+ id: []const u8,
+ name: []const u8,
+ version: []const u8 = "",
+ author: []const u8 = "",
+ license: []const u8 = "",
+ description: []const u8 = "",
+ root: []const u8 = "",
+ bytes: []const u8,
+ tokens: theme.Theme = .{},
+ taskbar: ?theme.Theme = null,
+ wallpaper: []const u8 = "",
+ color_scheme: ?bool = null,
+ icon_theme: []const u8 = "",
+ cursor_theme: []const u8 = "",
+ user_installed: bool = false,
+};
+
+pub fn validId(id: []const u8) bool {
+ if (id.len == 0 or id.len > 64) return false;
+ for (id) |ch| if (!(ch >= 'a' and ch <= 'z') and !(ch >= '0' and ch <= '9') and ch != '-') return false;
+ return true;
+}
+
+pub fn relative(path: []const u8) bool {
+ if (path.len == 0 or path[0] == '/' or std.mem.indexOfAny(u8, path, "\\\x00\"\n\r\t:") != null) return false;
+ var parts = std.mem.splitScalar(u8, path, '/');
+ while (parts.next()) |part| if (part.len == 0 or std.mem.eql(u8, part, "..") or std.mem.eql(u8, part, ".")) return false;
+ return true;
+}
+
+/// Reject symlinks in every component, including the pack root.
+pub fn asset(a: A, io: Io, root: []const u8, path: []const u8) ![]const u8 {
+ if (!relative(path)) return error.UnsafeAssetPath;
+ const full = try std.fs.path.join(a, &.{ root, path });
+ errdefer a.free(full);
+ var i: usize = 1;
+ while (i <= full.len) : (i += 1) {
+ if (i != full.len and full[i] != '/') continue;
+ const stat = try Io.Dir.cwd().statFile(io, full[0..i], .{ .follow_symlinks = false });
+ if (stat.kind == .sym_link) return error.UnsafeAssetPath;
+ }
+ return full;
+}
+
+pub fn parse(a: A, bytes: []const u8, fallback_id: []const u8, root: []const u8) !Pack {
+ var p: Pack = .{ .id = fallback_id, .name = fallback_id, .root = root, .bytes = bytes };
+ var unknown_keys: usize = 0;
+ var section: []const u8 = "";
+ var lines = std.mem.splitScalar(u8, bytes, '\n');
+ while (lines.next()) |raw| {
+ const line = theme.stripComment(std.mem.trim(u8, raw, " \t\r"));
+ if (line.len == 0) continue;
+ if (line[0] == '[') {
+ if (line[line.len - 1] != ']') return error.InvalidPack;
+ section = line[1 .. line.len - 1];
+ if (std.mem.eql(u8, section, "taskbar_theme")) p.taskbar = .{};
+ continue;
+ }
+ const eq = std.mem.indexOfScalar(u8, line, '=') orelse return error.InvalidPack;
+ const key = std.mem.trim(u8, line[0..eq], " \t");
+ const value = std.mem.trim(u8, line[eq + 1 ..], " \t");
+ if (std.mem.eql(u8, section, "meta")) {
+ if (std.mem.eql(u8, key, "format")) {
+ if ((std.fmt.parseInt(u32, value, 10) catch return error.InvalidPack) != 1) return error.UnsupportedPackFormat;
+ } else inline for (.{ "id", "name", "version", "author", "license", "description" }) |field| {
+ if (std.mem.eql(u8, key, field)) {
+ const text = try theme.unquote(value);
+ const limit: usize = if (std.mem.eql(u8, field, "description")) 4096 else 256;
+ if (text.len > limit) return error.InvalidMetadata;
+ if (std.mem.eql(u8, field, "id") and !validId(text)) return error.InvalidPackId;
+ @field(p, field) = try a.dupe(u8, text);
+ }
+ }
+ } else if (std.mem.eql(u8, section, "theme")) {
+ if (std.mem.eql(u8, key, "base")) return error.RecursiveThemeBase;
+ if (std.mem.eql(u8, key, "start_button_icon") and root.len > 0) {
+ const path = try theme.unquote(value);
+ if (path.len > 0) {
+ if (!relative(path)) return error.UnsafeAssetPath;
+ p.tokens.start_button_icon = try std.fs.path.join(a, &.{ root, path });
+ }
+ } else {
+ if (!theme.knownKey(key)) {
+ if (unknown_keys < 16) std.log.warn("theme pack '{s}': skipping unknown key '{s}'", .{ p.id, key[0..@min(128, key.len)] });
+ unknown_keys += 1;
+ }
+ try theme.applyKey(a, &p.tokens, key, value);
+ }
+ } else if (std.mem.eql(u8, section, "taskbar_theme")) {
+ _ = try theme.applyTaskbarKey(a, &p.taskbar.?, key, value);
+ } else if (std.mem.eql(u8, section, "assets")) {
+ const text = try theme.unquote(value);
+ if (std.mem.eql(u8, key, "color_scheme")) {
+ p.color_scheme = if (std.mem.eql(u8, text, "dark")) true else if (std.mem.eql(u8, text, "light")) false else return error.InvalidColorScheme;
+ } else inline for (.{ "wallpaper", "icon_theme", "cursor_theme" }) |field| {
+ if (std.mem.eql(u8, key, field)) {
+ if (text.len > 0 and !relative(text)) return error.UnsafeAssetPath;
+ @field(p, field) = try a.dupe(u8, text);
+ }
+ }
+ }
+ }
+ if (p.tokens.font.len > 256 or p.tokens.mono_font.len > 256) return error.InvalidFontName;
+ if (!validId(p.id) or p.name.len == 0) return error.InvalidPackId;
+ return p;
+}
+
+pub fn userDir(a: A, env: std.process.Environ) ![]const u8 {
+ if (env.getPosix("XDG_DATA_HOME")) |path| if (std.fs.path.isAbsolute(path)) return std.fs.path.join(a, &.{ path, "rediwm/themes" });
+ return std.fs.path.join(a, &.{ env.getPosix("HOME") orelse return error.NoHome, ".local/share/rediwm/themes" });
+}
+
+fn append(out: *std.ArrayList(Pack), a: A, p: Pack) !void {
+ for (out.items) |old| if (std.mem.eql(u8, old.id, p.id)) return;
+ try out.append(a, p);
+}
+
+fn scan(out: *std.ArrayList(Pack), a: A, io: Io, path: []const u8, legacy: bool, user: bool) !void {
+ var dir = Io.Dir.cwd().openDir(io, path, .{ .iterate = true }) catch return;
+ defer dir.close(io);
+ var names: std.ArrayList([]const u8) = .empty;
+ var it = dir.iterate();
+ while (try it.next(io)) |e| {
+ if (e.name[0] == '.') continue;
+ if (legacy) {
+ if (e.kind != .file or !std.mem.endsWith(u8, e.name, ".toml")) continue;
+ } else if (e.kind != .directory) continue;
+ try names.append(a, try a.dupe(u8, e.name));
+ }
+ std.mem.sort([]const u8, names.items, {}, struct {
+ fn less(_: void, x: []const u8, y: []const u8) bool {
+ return std.mem.lessThan(u8, x, y);
+ }
+ }.less);
+ for (names.items) |name| {
+ const root = if (legacy) "" else try std.fs.path.join(a, &.{ path, name });
+ const file = try std.fs.path.join(a, &.{ path, name, if (legacy) "" else "theme.toml" });
+ const bytes = Io.Dir.cwd().readFileAlloc(io, file, a, .limited(1 << 20)) catch continue;
+ const stem = if (legacy) name[0 .. name.len - 5] else name;
+ const id = if (legacy) try legacyId(a, stem) else name;
+ var p = parse(a, bytes, id, root) catch |err| {
+ std.log.warn("theme pack '{s}': {s}", .{ file, @errorName(err) });
+ continue;
+ };
+ // Directory identity must agree with metadata for deterministic lookup.
+ if (!legacy and !std.mem.eql(u8, p.id, name)) continue;
+ if (legacy and std.mem.eql(u8, p.name, id)) p.name = stem;
+ p.user_installed = user;
+ if (p.tokens.start_button_icon.len > 0 and root.len > 0) {
+ const rel = p.tokens.start_button_icon[root.len + 1 ..];
+ p.tokens.start_button_icon = asset(a, io, root, rel) catch "";
+ }
+ try append(out, a, p);
+ }
+}
+
+pub fn list(a: A, io: Io, env: std.process.Environ, config_path: []const u8) ![]Pack {
+ var out: std.ArrayList(Pack) = .empty;
+ if (userDir(a, env)) |dir| try scan(&out, a, io, dir, false, true) else |_| {}
+ if (std.fs.path.dirname(config_path)) |dir| try scan(&out, a, io, try std.fs.path.join(a, &.{ dir, "themes" }), true, false);
+ if (std.process.executableDirPathAlloc(io, a)) |exe| try scan(&out, a, io, try std.fs.path.resolve(a, &.{ exe, "../share/rediwm/themes" }), false, false) else |_| {}
+ var dirs = std.mem.splitScalar(u8, env.getPosix("XDG_DATA_DIRS") orelse "/usr/local/share:/usr/share", ':');
+ while (dirs.next()) |dir| if (std.fs.path.isAbsolute(dir)) try scan(&out, a, io, try std.fs.path.join(a, &.{ dir, "rediwm/themes" }), false, false);
+ for (presets.bundled) |p| try append(&out, a, try parse(a, p.bytes, p.id, ""));
+ // The display names of embedded packs predate metadata.
+ for (out.items) |*p| if (p.root.len == 0) {
+ for (presets.bundled) |b| if (p.bytes.ptr == b.bytes.ptr) {
+ p.name = b.name;
+ };
+ };
+ return out.toOwnedSlice(a);
+}
+
+pub fn find(a: A, io: Io, env: std.process.Environ, config_path: []const u8, id: []const u8) !?Pack {
+ if (!validId(id)) return error.InvalidPackId;
+ for (try list(a, io, env, config_path)) |p| if (std.mem.eql(u8, p.id, id)) return p;
+ return null;
+}
+
+test "pack metadata, future tokens and unsafe paths" {
+ var arena = std.heap.ArenaAllocator.init(std.testing.allocator);
+ defer arena.deinit();
+ const a = arena.allocator();
+ const p = try parse(a, "[meta]\nformat = 1\nname = \"Nord\"\n[theme]\naccent = \"#88c0d0\"\nfuture_token = 42\nstart_button_icon = \"logo.svg\"\n[assets]\ncolor_scheme = \"dark\"\n", "nord", "/tmp/nord");
+ try std.testing.expectEqualStrings("Nord", p.name);
+ try std.testing.expectEqualStrings("/tmp/nord/logo.svg", p.tokens.start_button_icon);
+ try std.testing.expect(p.color_scheme.?);
+ try std.testing.expectError(error.UnsupportedPackFormat, parse(a, "[meta]\nformat = 2", "nord", ""));
+ try std.testing.expectError(error.UnsafeAssetPath, parse(a, "[theme]\nstart_button_icon = \"../logo.svg\"", "nord", "/tmp/nord"));
+ for ([_][]const u8{ "../x", "/x", "x//y", "x/./y", "x\\y" }) |path| try std.testing.expect(!relative(path));
+ try std.testing.expect(!validId("../nord"));
+}
+
+fn legacyId(a: A, name: []const u8) ![]const u8 {
+ const id = try a.dupe(u8, name);
+ for (id) |*ch| {
+ ch.* = std.ascii.toLower(ch.*);
+ if (!(ch.* >= 'a' and ch.* <= 'z') and !(ch.* >= '0' and ch.* <= '9')) ch.* = '-';
+ }
+ return id;
+}
+
+test "embedded packs retain their palettes and saving keeps only overrides" {
+ const a = std.testing.allocator;
+ var arena = std.heap.ArenaAllocator.init(a);
+ defer arena.deinit();
+ for (presets.bundled) |b| {
+ const p = try parse(arena.allocator(), b.bytes, b.id, "");
+ try std.testing.expect(@import("loader.zig").themeEql(try theme.parse(arena.allocator(), b.bytes), p.tokens));
+ var edited = p.tokens;
+ edited.font_size += 1;
+ var out: std.ArrayList(u8) = .empty;
+ defer out.deinit(a);
+ try theme.writeOverrides(a, &out, edited, p.tokens, p.id);
+ try std.testing.expect(std.mem.indexOf(u8, out.items, "base =") != null);
+ try std.testing.expect(std.mem.indexOf(u8, out.items, "font_size =") != null);
+ try std.testing.expect(std.mem.indexOf(u8, out.items, "accent =") == null);
+ var restored = p.tokens;
+ try theme.overlay(arena.allocator(), &restored, out.items);
+ try std.testing.expect(@import("loader.zig").themeEql(edited, restored));
+ }
+}
+
+test "discovery order deduplicates IDs and legacy filenames keep display names" {
+ const io = std.testing.io;
+ var tmp = std.testing.tmpDir(.{});
+ defer tmp.cleanup();
+ var arena = std.heap.ArenaAllocator.init(std.testing.allocator);
+ defer arena.deinit();
+ const a = arena.allocator();
+ const root = try tmp.dir.realPathFileAlloc(io, ".", a);
+ try tmp.dir.createDirPath(io, "data/rediwm/themes/collision");
+ try tmp.dir.createDirPath(io, "config/themes");
+ try tmp.dir.createDirPath(io, "system/rediwm/themes/collision");
+ try tmp.dir.writeFile(io, .{ .sub_path = "data/rediwm/themes/collision/theme.toml", .data = "[meta]\nname = \"User\"\n[theme]\nfont_size = 14\n" });
+ try tmp.dir.writeFile(io, .{ .sub_path = "config/themes/collision.toml", .data = "[theme]\nfont_size = 15\n" });
+ try tmp.dir.writeFile(io, .{ .sub_path = "config/themes/My Theme.toml", .data = "[theme]\nfont_size = 16\n" });
+ try tmp.dir.writeFile(io, .{ .sub_path = "system/rediwm/themes/collision/theme.toml", .data = "[theme]\nfont_size = 17\n" });
+ const data = try std.fmt.allocPrintSentinel(a, "XDG_DATA_HOME={s}/data", .{root}, 0);
+ const system = try std.fmt.allocPrintSentinel(a, "XDG_DATA_DIRS={s}/system", .{root}, 0);
+ const entries = [_:null]?[*:0]const u8{ data.ptr, system.ptr };
+ const env: std.process.Environ = .{ .block = .{ .slice = &entries } };
+ const config_path = try std.fs.path.join(a, &.{ root, "config/config.toml" });
+ const items = try list(a, io, env, config_path);
+ var count: usize = 0;
+ for (items) |p| {
+ if (std.mem.eql(u8, p.id, "collision")) {
+ count += 1;
+ try std.testing.expectEqual(@as(f32, 14), p.tokens.font_size);
+ }
+ if (std.mem.eql(u8, p.id, "my-theme")) try std.testing.expectEqualStrings("My Theme", p.name);
+ }
+ try std.testing.expectEqual(@as(usize, 1), count);
+ const legacy = (try find(a, io, env, config_path, "my-theme")).?;
+ try std.testing.expectEqual(@as(f32, 16), legacy.tokens.font_size);
+}
+
+test "asset resolution refuses symlinks and frees failed paths" {
+ const a = std.testing.allocator;
+ const io = std.testing.io;
+ var tmp = std.testing.tmpDir(.{});
+ defer tmp.cleanup();
+ const root = try tmp.dir.realPathFileAlloc(io, ".", a);
+ defer a.free(root);
+ try tmp.dir.writeFile(io, .{ .sub_path = "logo.svg", .data = "svg" });
+ try tmp.dir.symLink(io, "logo.svg", "alias.svg", .{});
+ try std.testing.expectError(error.UnsafeAssetPath, asset(a, io, root, "alias.svg"));
+ try std.testing.expectError(error.FileNotFound, asset(a, io, root, "missing.svg"));
+ const path = try asset(a, io, root, "logo.svg");
+ defer a.free(path);
+ try std.testing.expect(std.mem.endsWith(u8, path, "/logo.svg"));
+}
diff --git a/src/config_runtime/apply.zig b/src/config_runtime/apply.zig
index acd492c..ec7cb26 100644
--- a/src/config_runtime/apply.zig
+++ b/src/config_runtime/apply.zig
@@ -23,6 +23,9 @@ const themeEql = loader.themeEql;
const wheelAccel = loader.wheelAccel;
pub const applyInactiveOpacity = applyWindowOpacity;
pub fn applyDiff(server: *Server, old: Config, new: Config) void {
+ const pack_changed = !std.mem.eql(u8, old.theme_base, new.theme_base) or
+ !std.mem.eql(u8, if (old.theme_pack) |p| p.root else "", if (new.theme_pack) |p| p.root else "") or
+ !std.mem.eql(u8, if (old.theme_pack) |p| p.bytes else "", if (new.theme_pack) |p| p.bytes else "");
server.world.workspaces.setMode(server, new.compositor.desktop_mode == .workspaces);
server.window_tabs.reconfigure(server);
if (old.compositor.window_gap != new.compositor.window_gap) server.world.workspaces.tiler.schedule(server);
@@ -48,6 +51,8 @@ pub fn applyDiff(server: *Server, old: Config, new: Config) void {
if (!outputsColorEql(old.outputs, new.outputs) or !nightLightEql(old.night_light, new.night_light)) {
server.night_light.reconfigure(new.night_light);
}
+ @import("ui").shell_icons.configure(server.io, if (new.theme_pack) |p| p.root else "");
+ if (pack_changed or !std.mem.eql(u8, old.compositor.icon_theme, new.compositor.icon_theme)) @import("theme_pack.zig").configureIcons(server);
theme_mod.global = new.theme;
theme_mod.taskbar_override = if (new.taskbar_theme) |chosen| theme_mod.taskbarTokens(chosen) else null;
@import("ui").text.setPreferredFamilies(theme_mod.global.font, theme_mod.global.mono_font);
@@ -144,7 +149,7 @@ pub fn applyDiff(server: *Server, old: Config, new: Config) void {
n.dnd = new.notifications.dnd;
n.default_timeout_ms = new.notifications.default_timeout_ms;
}
- if (!std.mem.eql(u8, old.compositor.wallpaper, new.compositor.wallpaper)) server.reloadWallpaper();
+ if (!std.mem.eql(u8, old.compositor.wallpaper, new.compositor.wallpaper) or pack_changed) server.reloadWallpaper();
if (old.compositor.dark_mode != new.compositor.dark_mode) {
@import("../session/settings_portal.zig").emitColorScheme(server);
// A hand edit while settings is open: rebuild so the toggle agrees.
@@ -160,7 +165,7 @@ pub fn applyDiff(server: *Server, old: Config, new: Config) void {
if (server.input.open_control_center) |cc| cc.refresh();
}
- const theme_changed = !themeEql(old.theme, new.theme) or old.compositor.border_radius != new.compositor.border_radius;
+ const theme_changed = pack_changed or !themeEql(old.theme, new.theme) or old.compositor.border_radius != new.compositor.border_radius;
const taskbar_theme_changed = !theme_mod.taskbarOverrideEql(old.taskbar_theme, new.taskbar_theme);
if (theme_changed) {
if (server.desktop) |desktop| desktop.app.themeChanged();
diff --git a/src/config_runtime/theme_job.zig b/src/config_runtime/theme_job.zig
new file mode 100644
index 0000000..935e77f
--- /dev/null
+++ b/src/config_runtime/theme_job.zig
@@ -0,0 +1,123 @@
+//! Helper jobs wake once by eventfd; no archive/image work on the event loop.
+const std = @import("std");
+const Server = @import("../Server.zig");
+const wl = @import("wayland").server.wl;
+const protocol = @import("../ipc/protocol.zig");
+const Client = @import("../ipc/server.zig").Client;
+const c = std.posix.system;
+const a = std.heap.c_allocator;
+pub const Job = struct {
+ arena: std.heap.ArenaAllocator,
+ server: *Server,
+ io: std.Io,
+ argv: []const []const u8,
+ env: std.process.Environ.Map,
+ fd: c_int,
+ source: ?*wl.EventSource = null,
+ thread: ?std.Thread = null,
+ result: anyerror!std.process.RunResult = error.NotFinished,
+ client: ?*Client = null,
+ id: ?protocol.RequestId = null,
+
+ pub fn deinit(self: *Job) void {
+ if (self.source) |s| s.remove();
+ if (self.thread) |t| t.join();
+ _ = c.close(self.fd);
+ self.env.deinit();
+ self.arena.deinit();
+ a.destroy(self);
+ }
+ fn run(self: *Job) void {
+ self.result = std.process.run(self.arena.allocator(), self.io, .{
+ .argv = self.argv,
+ .environ_map = &self.env,
+ .stdout_limit = .limited(4096),
+ .stderr_limit = .limited(16384),
+ .timeout = .{ .duration = .{ .raw = .fromSeconds(30), .clock = .awake } },
+ });
+ const one: u64 = 1;
+ _ = c.write(self.fd, std.mem.asBytes(&one).ptr, @sizeOf(u64));
+ }
+};
+
+pub fn start(server: *Server, args: []const []const u8, client: ?*Client, id: ?protocol.RequestId) !void {
+ if (server.locker != null or server.greeter_mode) return error.SessionLocked;
+ if (server.theme_job != null) return error.ThemeJobBusy;
+ var arena = std.heap.ArenaAllocator.init(a);
+ errdefer arena.deinit();
+ const mem = arena.allocator();
+ const exe = try std.process.executableDirPathAlloc(server.io, mem);
+ var argv = try mem.alloc([]const u8, args.len + 1);
+ argv[0] = try std.fs.path.join(mem, &.{ exe, "rediwm-theme" });
+ for (args, argv[1..]) |arg, *dst| dst.* = try mem.dupe(u8, arg);
+ var env = try server.environ.createMap(a);
+ errdefer env.deinit();
+ const fd = c.eventfd(0, @intCast(std.os.linux.EFD.CLOEXEC | std.os.linux.EFD.NONBLOCK));
+ if (fd < 0) return error.EventFdFailed;
+ errdefer _ = c.close(fd);
+ const job = try a.create(Job);
+ errdefer a.destroy(job);
+ job.* = .{ .arena = arena, .server = server, .io = server.io, .argv = argv, .env = env, .fd = fd, .client = client, .id = if (id) |rid| switch (rid) {
+ .integer => rid,
+ .string => |s| .{ .string = try mem.dupe(u8, s) },
+ } else null };
+ job.source = try server.wl_server.getEventLoop().addFd(*Job, fd, .{ .readable = true }, ready, job);
+ errdefer job.source.?.remove();
+ job.thread = try std.Thread.spawn(.{}, Job.run, .{job});
+ server.theme_job = job;
+ if (server.input.open_control_center) |cc| {
+ cc.appearance.theme_message = if (std.mem.eql(u8, args[0], "install")) "Installing theme…" else if (std.mem.eql(u8, args[0], "remove")) "Removing theme…" else "Saving theme…";
+ cc.refresh();
+ }
+}
+fn ready(_: c_int, _: wl.EventMask, job: *Job) c_int {
+ job.thread.?.join();
+ job.thread = null;
+ const server = job.server;
+ server.theme_job = null;
+ defer job.deinit();
+ var message: []const u8 = "Theme saved.";
+ var response: protocol.Response = .{ .ok = .{ .theme_job = .{ .id = "", .message = message } } };
+ if (job.result) |result| {
+ const success = result.term == .exited and result.term.exited == 0;
+ message = if (success) "Theme saved." else result.stderr;
+ const installed_id = std.mem.trim(u8, result.stdout, " \n\r");
+ if (success and server.locker == null and (std.mem.eql(u8, installed_id, server.config.theme_base) or (std.mem.eql(u8, job.argv[1], "remove") and std.mem.eql(u8, job.argv[2], server.config.theme_base)))) {
+ // App clients stat the config, so an active-pack upgrade publishes
+ // a fresh timestamp even when its base and overrides are unchanged.
+ var scratch = std.heap.ArenaAllocator.init(a);
+ defer scratch.deinit();
+ const bytes = std.Io.Dir.cwd().readFileAlloc(server.io, server.config.path, scratch.allocator(), .limited(1 << 20)) catch "";
+ if (bytes.len > 0) std.Io.Dir.cwd().writeFile(server.io, .{ .sub_path = server.config.path, .data = bytes }) catch {};
+ @import("watcher.zig").reloadConfig(server);
+ @import("theme_pack.zig").configureIcons(server);
+ if (server.wallpaper_source) |path| @import("../main.zig").gpa.free(path);
+ server.wallpaper_source = null;
+ server.reloadWallpaper();
+ server.input.reloadCursorTheme();
+ @import("../control_center/sections/appearance.zig").refreshTheme(server, true);
+ }
+ response = if (success) .{ .ok = .{ .theme_job = .{ .id = std.mem.trim(u8, result.stdout, " \n\r"), .message = message } } } else .{ .err = message };
+ } else |err| {
+ message = @errorName(err);
+ response = .{ .err = message };
+ }
+ if (job.client) |client| {
+ if (server.locker != null) response = .{ .err = "SessionLocked" };
+ if (client.sandbox) |sb| if (!server.config.sandboxAllowGroups(sb.app_id, sb.engine).contains(.ipc)) {
+ response = .{ .err = "PermissionDenied" };
+ };
+ const writer = protocol.BufferWriter{ .list = &client.write_buf, .allocator = client.ipc.allocator };
+ protocol.stringifyResponseWithId(job.id, response, writer) catch {};
+ client.updateFdInterest() catch {};
+ }
+ if (server.input.open_control_center) |cc| {
+ if (std.mem.indexOf(u8, message, "AlreadyInstalled") == null) {
+ if (cc.appearance.theme_pending_path) |path| @import("../main.zig").gpa.free(path);
+ cc.appearance.theme_pending_path = null;
+ }
+ cc.appearance.theme_message = std.fmt.bufPrint(&cc.appearance.theme_message_buf, "{s}", .{message[0 .. std.mem.indexOfScalar(u8, message, '\n') orelse message.len]}) catch "Theme operation failed.";
+ cc.refresh();
+ }
+ return 0;
+}
diff --git a/src/config_runtime/theme_pack.zig b/src/config_runtime/theme_pack.zig
new file mode 100644
index 0000000..5f59401
--- /dev/null
+++ b/src/config_runtime/theme_pack.zig
@@ -0,0 +1,59 @@
+//! Explicit pack actions share one path between Appearance and IPC.
+const std = @import("std");
+const Server = @import("../Server.zig");
+const config = @import("config");
+const main = @import("../main.zig");
+
+pub fn apply(server: *Server, id: []const u8) !void {
+ if (server.greeter_mode or server.locker != null) return error.SessionLocked;
+ var arena = std.heap.ArenaAllocator.init(main.gpa);
+ defer arena.deinit();
+ const p = (try config.theme_pack.find(arena.allocator(), server.io, server.environ, server.config.path, id)) orelse return error.ThemeNotFound;
+ if (server.config.path.len == 0) return error.NoConfigPath;
+ config.loader.replaceThemeOverrides(main.gpa, server.io, server.config.path, p.tokens, p.tokens, id);
+ config.loader.replaceTaskbarThemeSection(main.gpa, server.io, server.config.path, p.taskbar);
+ // Empty wallpaper means the pack default. Explicit later choices pin it.
+ config.setting_save.saveCompositor(main.gpa, server.io, server.config.path, "wallpaper", "") catch return error.SaveFailed;
+ if (p.color_scheme) |dark| config.setting_save.saveCompositor(main.gpa, server.io, server.config.path, "dark_mode", dark) catch return error.SaveFailed;
+ {
+ const name = if (p.cursor_theme.len == 0) "default" else if (std.mem.eql(u8, p.cursor_theme, "pack")) try std.fmt.allocPrint(arena.allocator(), "rediwm-{s}-cursors", .{p.id}) else p.cursor_theme;
+ config.setting_save.saveInput(main.gpa, server.io, server.config.path, "cursor_theme", name) catch return error.SaveFailed;
+ }
+ const loaded = try config.loader.load(server.config.path, main.gpa, server.io, server.environ);
+ if (!std.mem.eql(u8, loaded.theme_base, id)) {
+ var failed = loaded;
+ failed.deinit();
+ return error.SaveFailed;
+ }
+ @import("watcher.zig").applyLoadedConfig(server, loaded);
+}
+
+pub fn wallpaperPath(server: *Server, a: std.mem.Allocator) ![]u8 {
+ if (server.config.compositor.wallpaper.len == 0) {
+ if (server.config.theme_pack) |p| if (p.wallpaper.len > 0) {
+ // Built-in presets have no root: their wallpaper is a bundled name.
+ if (p.root.len == 0) return @import("../wallpapers.zig").resolve(a, server.io, p.wallpaper);
+ const rel = try std.fs.path.join(a, &.{ "wallpapers", p.wallpaper });
+ defer a.free(rel);
+ if (config.theme_pack.asset(a, server.io, p.root, rel)) |path| return @constCast(path) else |_| {}
+ };
+ }
+ return @import("../wallpapers.zig").resolve(a, server.io, server.config.compositor.wallpaper);
+}
+
+pub fn configureIcons(server: *Server) void {
+ var cfg = server.icon_theme_cfg;
+ cfg.generation += 1;
+ cfg.override_root = if (server.config.theme_pack) |p| p.root else "";
+ cfg.theme_name = if (server.config.theme_pack) |p| (if (p.icon_theme.len > 0) p.icon_theme else server.config.compositor.icon_theme) else server.config.compositor.icon_theme;
+ if (cfg.theme_name.len == 0) cfg.theme_name = server.environ.getPosix("REDIWM_ICON_THEME") orelse "Adwaita";
+ if (server.icon_service) |svc| {
+ defer server.icon_theme_cfg = svc.cfg;
+ svc.reconfigure(cfg) catch |err| {
+ std.log.warn("icon theme reload: {s}", .{@errorName(err)});
+ return;
+ };
+ server.icon_theme_cfg = svc.cfg;
+ if (server.desktop) |desktop| desktop.app.worker.updateTheme(svc.cfg);
+ }
+}
diff --git a/src/control_center/sections/appearance.zig b/src/control_center/sections/appearance.zig
index 5c09d3a..5447b93 100644
--- a/src/control_center/sections/appearance.zig
+++ b/src/control_center/sections/appearance.zig
@@ -11,7 +11,7 @@ const layout = @import("ui").layout;
const ui_slider = @import("ui").widgets.slider;
const theme = @import("ui").theme;
const scrollbar = @import("ui").widgets.scrollbar;
-const theme_presets = @import("ui").theme_presets;
+const theme_presets = @import("config").theme_pack;
const Widget = layout.Widget;
const main = @import("../../main.zig");
const panel = @import("../panel.zig");
@@ -93,7 +93,7 @@ pub const Section = struct {
cc: *panel.ControlCenter = undefined,
root: Widget = undefined,
arena: std.heap.ArenaAllocator = .init(std.heap.page_allocator),
- presets: []const theme_presets.Preset = &.{},
+ presets: []const theme_presets.Pack = &.{},
top_children: [2]Widget = undefined,
font_arena: std.heap.ArenaAllocator = .init(std.heap.page_allocator),
font_families: ?[][]const u8 = null,
@@ -101,7 +101,7 @@ pub const Section = struct {
cursor_themes: ?[]cursor_theme.Theme = null,
cursor_row_children: [2]Widget = undefined,
family_row_children: [2]Widget = undefined,
- row_storage: [23]Widget = undefined,
+ row_storage: [25]Widget = undefined,
focus_zoom_children: [3]Widget = undefined,
/// Rescanned on every build, so images added meanwhile show up.
wallpapers: []const wallpapers.Entry = &.{},
@@ -116,6 +116,14 @@ pub const Section = struct {
wallpaper_row_children: [2]Widget = undefined,
wallpaper_footer_children: [2]Widget = undefined,
theme_row_children: [2]Widget = undefined,
+ theme_actions: [5]Widget = undefined,
+ theme_preview_pending: bool = false,
+ theme_message: []const u8 = "Packs include colours and artwork. Personal edits are saved as overrides.",
+ theme_message_buf: [768]u8 = undefined,
+ theme_pending_path: ?[]u8 = null,
+ icon_theme_row: [2]Widget = undefined,
+ icon_theme_names: []const []const u8 = &.{},
+
taskbar_theme_row_children: [2]Widget = undefined,
app_colors_children: [3]Widget = undefined,
app_colors_buttons: [2]Widget = undefined,
@@ -229,7 +237,7 @@ fn startLogoImage(out: *Section, a: std.mem.Allocator, logical: i32) StartLogo {
/// A decode finished: a preview that was waiting for one can now show it.
pub fn iconsReady(s: *Section) void {
- if (s.start_logo_pending and s.cc.page == .appearance) s.cc.refresh();
+ if ((s.start_logo_pending or s.theme_preview_pending) and s.cc.page == .appearance) s.cc.refresh();
}
fn indexOfNearest(values: []const f32, v: f32) usize {
@@ -305,18 +313,17 @@ pub fn build(out: *Section, cc: *panel.ControlCenter) void {
if (out.tabs_built and out.tabs_children[2].kind == .scroll_container) out.tabs_scroll = out.tabs_children[2].kind.scroll_container;
_ = out.arena.reset(.free_all);
const t = theme.global;
+ const server = out.cc.server;
const arena = out.arena.allocator();
- out.presets = theme_presets.list(arena, out.cc.server.io, out.cc.server.config.path);
+ out.presets = theme_presets.list(arena, out.cc.server.io, out.cc.server.environ, out.cc.server.config.path) catch &.{};
var preset_labels: [][]const u8 = &.{};
var matched_index: ?usize = null;
if (arena.alloc([]const u8, out.presets.len)) |labels| {
preset_labels = labels;
for (out.presets, 0..) |preset, i| {
preset_labels[i] = preset.name;
- if (matched_index != null) continue;
- const parsed = theme.parse(arena, preset.bytes) catch continue;
- if (loader.themeEql(parsed, t)) matched_index = i;
+ if (std.mem.eql(u8, preset.id, out.cc.server.config.theme_base)) matched_index = i;
}
} else |_| {}
out.theme_row_children = .{
@@ -347,7 +354,7 @@ pub fn build(out: *Section, cc: *panel.ControlCenter) void {
labels[i] = preset.name;
const chosen = theme.taskbar_override orelse continue;
if (taskbar_selected != null) continue;
- const parsed = theme.parse(arena, preset.bytes) catch continue;
+ const parsed = preset.tokens;
if (theme.taskbarTokensEql(parsed, chosen)) taskbar_selected = i;
}
} else |_| {}
@@ -681,7 +688,49 @@ pub fn build(out: *Section, cc: *panel.ControlCenter) void {
out.start_menu_section_children = .{ sectionLabel("START MENU"), logo_row, menu_width_row, menu_height_row, menu_size_row, menu_left_row, menu_bottom_row, icon_left_row, icon_bottom_row };
const start_menu_section: Widget = .{ .kind = .container, .direction = .column, .gap = 12, .children = &out.start_menu_section_children };
+ out.theme_actions = .{
+ .{ .name = "theme_reset", .kind = .{ .button = .{ .label = "Reset to theme", .owner = out, .on_click = &onResetTheme } }, .height = .{ .fixed = 32 } },
+ .{ .name = "theme_install", .kind = .{ .button = .{ .label = "Install theme…", .owner = out, .on_click = &onInstallTheme } }, .height = .{ .fixed = 32 } },
+ .{ .name = "theme_remove", .kind = .{ .button = .{ .label = "Remove", .owner = out, .on_click = &onRemoveTheme, .state = if (matched_index != null and out.presets[matched_index.?].user_installed) .idle else .disabled } }, .height = .{ .fixed = 32 } },
+ .{ .name = "theme_export", .kind = .{ .button = .{ .label = "Save look…", .owner = out, .on_click = &onExportTheme } }, .height = .{ .fixed = 32 } },
+ .{ .name = "theme_replace", .kind = .{ .button = .{ .label = "Replace installed theme", .owner = out, .on_click = &onReplaceTheme, .state = if (out.theme_pending_path != null) .idle else .disabled } }, .height = .{ .fixed = 32 } },
+ };
+ var pack_preview: Widget = .{ .kind = .container };
+ out.theme_preview_pending = false;
+ if (server.config.theme_pack) |pack| {
+ if (pack.root.len > 0) {
+ if (theme_presets.asset(arena, server.io, pack.root, "preview.png")) |path| {
+ const result = server.iconLookup(path, 192);
+ if (result == .ready) {
+ const entry = result.ready;
+ if (arena.dupe(u32, entry.pixels)) |pixels| {
+ pack_preview = .{ .name = "theme_preview", .kind = .{ .image = .{ .pixels = pixels, .width = entry.size, .height = entry.size, .fallback_icon = null } }, .width = .{ .fixed = 160 }, .height = .{ .fixed = 100 } };
+ } else |_| {}
+ } else if (result == .pending) out.theme_preview_pending = true;
+ } else |_| {}
+ }
+ }
+ const pack_controls = arena.dupe(Widget, &.{
+ .{ .kind = .container, .direction = .row, .gap = 8, .children = out.theme_actions[0..4] },
+ .{ .kind = .{ .text = .{ .content = out.theme_message, .font_size = theme.global.app_status_size, .color = pal.dim } } },
+ .{ .kind = .container, .children = if (out.theme_pending_path != null) out.theme_actions[4..5] else &.{} },
+ pack_preview,
+ }) catch @constCast(&[_]Widget{});
+ const icon_themes = @import("../../icon_theme.zig").listNames(arena, server.io, server.icon_theme_cfg) catch &.{};
+ out.icon_theme_names = icon_themes;
+ const icon_labels = arena.dupe([]const u8, icon_themes) catch @constCast(icon_themes);
+ if (icon_labels.len > 0) icon_labels[0] = "System default";
+ var icon_selected: ?usize = null;
+ for (icon_themes, 0..) |name, i| if (std.mem.eql(u8, name, server.config.compositor.icon_theme)) {
+ icon_selected = i;
+ };
+ out.icon_theme_row = .{
+ labelWidget("Icon theme"),
+ .{ .name = "icon_theme", .kind = .{ .select = .{ .labels = icon_labels, .selected = icon_selected, .placeholder = "Pack or system default", .owner = out, .on_change = &onIconThemePicked } }, .width = .{ .fixed = segmented_width } },
+ };
out.row_storage = .{
+ .{ .kind = .container, .direction = .column, .gap = 8, .children = pack_controls },
+ .{ .kind = .container, .direction = .row, .justify = .space_between, .@"align" = .center, .children = &out.icon_theme_row },
.{ .kind = .container, .direction = .row, .justify = .space_between, .@"align" = .center, .children = &out.theme_row_children },
.{ .kind = .container, .direction = .row, .justify = .space_between, .@"align" = .center, .children = &out.taskbar_theme_row_children },
.{ .kind = .container, .direction = .column, .gap = 8, .children = &out.app_colors_children },
@@ -755,6 +804,8 @@ fn stopStrip(out: *Section) void {
pub fn deinit(out: *Section) void {
stopStrip(out);
finishAppColors(out, false);
+ if (out.theme_pending_path) |p| main.gpa.free(p);
+ out.theme_pending_path = null;
}
fn appColorsNote(s: *Section, a: std.mem.Allocator, color: [4]f32) Widget {
@@ -871,7 +922,9 @@ fn restartStrip(out: *Section, server: *@import("../../Server.zig")) void {
fn buildWallpaper(out: *Section, arena: std.mem.Allocator) void {
const pal = panel.palette();
const server = out.cc.server;
- out.wallpapers = wallpapers.list(arena, server.io) catch &.{};
+ const ordinary = wallpapers.list(arena, server.io) catch &.{};
+ const pack_images = if (server.config.theme_pack) |p| (if (p.root.len > 0) wallpapers.listDir(arena, server.io, std.fs.path.join(arena, &.{ p.root, "wallpapers" }) catch "") catch &.{} else &.{}) else &.{};
+ out.wallpapers = std.mem.concat(arena, wallpapers.Entry, &.{ pack_images, ordinary }) catch ordinary;
const configured = server.config.compositor.wallpaper;
var labels: [][]const u8 = &.{};
if (arena.alloc([]const u8, out.wallpapers.len)) |l| {
@@ -904,7 +957,7 @@ fn buildWallpaper(out: *Section, arena: std.mem.Allocator) void {
restartStrip(out, server);
fresh = true;
}
- const resolved = wallpapers.resolve(arena, server.io, configured) catch "";
+ const resolved = @import("../../config_runtime/theme_pack.zig").wallpaperPath(server, arena) catch "";
var current_tile: ?usize = null;
for (out.strip_entries, 0..) |entry, i| {
if (std.mem.eql(u8, entry.path, resolved)) current_tile = i;
@@ -1105,10 +1158,17 @@ fn applyThemeChangeImpl(s: *Section, taskbar_geometry: bool) void {
fn saveThemeChange(server: *Server, taskbar_geometry: bool) void {
if (server.theme_path) |path| {
- theme.save(main.gpa, server.io, path, theme.global);
- theme.loadGlobal(main.gpa, server.io, path);
+ theme.saveOverlay(main.gpa, server.io, path, theme.global, server.config.theme_config) catch |err| {
+ themeFailure(server, err);
+ return;
+ };
+ const loaded = loader.load(server.config.path, main.gpa, server.io, server.environ) catch |err| {
+ themeFailure(server, err);
+ return;
+ };
+ @import("../../config_runtime/watcher.zig").applyLoadedConfig(server, loaded);
} else if (server.config.path.len > 0) {
- @import("config").loader.replaceThemeSection(main.gpa, server.io, server.config.path, theme.global);
+ @import("config").loader.replaceThemeOverrides(main.gpa, server.io, server.config.path, theme.global, server.config.theme_defaults, server.config.theme_base);
}
refreshTheme(server, taskbar_geometry);
}
@@ -1184,21 +1244,84 @@ pub fn refreshTheme(server: *@import("../../Server.zig"), taskbar_geometry: bool
/// than the panel's per-open arena: `theme.global`'s string fields must
/// outlive this build, and `applyThemeChange` below may trigger a repaint
/// that resets the arena.
-fn onThemePicked(owner: ?*anyopaque, _: usize, index: usize) void {
+fn onResetTheme(owner: ?*anyopaque, _: usize) void {
+ const server = section(owner).cc.server;
+ if (server.config.theme_base.len == 0) {
+ theme.global = .{};
+ saveThemeChange(server, true);
+ return;
+ }
+ @import("../../config_runtime/theme_pack.zig").apply(server, server.config.theme_base) catch |err| themeFailure(server, err);
+}
+fn themeFailure(server: *Server, err: anyerror) void {
+ if (server.input.open_control_center) |cc| {
+ cc.appearance.theme_message = std.fmt.bufPrint(&cc.appearance.theme_message_buf, "Theme operation failed: {s}", .{@errorName(err)}) catch "Theme operation failed.";
+ cc.refresh();
+ }
+}
+fn onInstallTheme(owner: ?*anyopaque, _: usize) void {
+ const server = section(owner).cc.server;
+ folder_picker.startWithOptions(server, .{ .title = "Install theme", .accept_label = "Install", .filters = &.{.{ .name = "Theme packs", .rules = &.{ .{ .kind = 0, .value = "*.rediwm-theme" }, .{ .kind = 0, .value = "*.zip" } } }} }, server, themeFileChosen) catch |err| themeFailure(server, err);
+}
+fn themeFileChosen(owner: ?*anyopaque, path: ?[]const u8) void {
+ const server: *Server = @ptrCast(@alignCast(owner orelse return));
+ const picked = path orelse return;
+ if (server.input.open_control_center) |cc| {
+ if (cc.appearance.theme_pending_path) |old| main.gpa.free(old);
+ cc.appearance.theme_pending_path = main.gpa.dupe(u8, picked) catch return;
+ }
+ @import("../../config_runtime/theme_job.zig").start(server, &.{ "install", picked }, null, null) catch |err| themeFailure(server, err);
+}
+fn onReplaceTheme(owner: ?*anyopaque, _: usize) void {
const s = section(owner);
- if (index >= s.presets.len) return;
- const bytes = s.presets[index].bytes;
- const parsed = theme.parse(main.gpa, bytes) catch |err| {
- std.log.warn("theme preset '{s}' failed to parse: {}", .{ s.presets[index].name, err });
+ const path = s.theme_pending_path orelse return;
+ @import("../../config_runtime/theme_job.zig").start(s.cc.server, &.{ "install", path, "--replace" }, null, null) catch |err| themeFailure(s.cc.server, err);
+}
+fn onRemoveTheme(owner: ?*anyopaque, _: usize) void {
+ const s = section(owner);
+ const server = s.cc.server;
+ const id = main.gpa.dupe(u8, server.config.theme_base) catch return;
+ defer main.gpa.free(id);
+ var permitted = false;
+ for (s.presets) |p| if (std.mem.eql(u8, p.id, id) and p.user_installed) {
+ permitted = true;
+ };
+ if (!permitted) return;
+ @import("../../config_runtime/theme_pack.zig").apply(server, "rediwm-dark") catch |err| {
+ themeFailure(server, err);
return;
};
- theme.global = parsed;
- // A preset replaces geometry and every retained taskbar colour too.
- applyThemeChangeImpl(section(owner), true);
- {
- const server = section(owner).cc.server;
- if (server.input.open_control_center) |cc| cc.refresh();
+ @import("../../config_runtime/theme_job.zig").start(server, &.{ "remove", id }, null, null) catch |err| themeFailure(server, err);
+}
+fn onExportTheme(owner: ?*anyopaque, _: usize) void {
+ const server = section(owner).cc.server;
+ folder_picker.startWithOptions(server, .{ .mode = .save, .title = "Save current look as theme", .current_name = "my-theme.rediwm-theme", .accept_label = "Save" }, server, exportFileChosen) catch |err| themeFailure(server, err);
+}
+fn exportFileChosen(owner: ?*anyopaque, path: ?[]const u8) void {
+ const server: *Server = @ptrCast(@alignCast(owner orelse return));
+ const picked = path orelse return;
+ const filename = std.fs.path.basename(picked);
+ const id = filename[0 .. std.mem.lastIndexOfScalar(u8, filename, '.') orelse filename.len];
+ if (!theme_presets.validId(id)) {
+ themeFailure(server, error.InvalidPackId);
+ return;
}
+ @import("../../config_runtime/theme_job.zig").start(server, &.{ "share", id, server.config.path, server.wallpaper_source orelse "", theme.global.start_button_icon, picked }, null, null) catch |err| themeFailure(server, err);
+}
+fn onIconThemePicked(owner: ?*anyopaque, _: usize, index: usize) void {
+ const s = section(owner);
+ const labels = s.icon_theme_names;
+ if (index >= labels.len) return;
+ setting_save.saveCompositor(main.gpa, s.cc.server.io, s.cc.server.config.path, "icon_theme", labels[index]) catch return;
+ @import("../../config_runtime/watcher.zig").reloadConfig(s.cc.server);
+}
+
+fn onThemePicked(owner: ?*anyopaque, _: usize, index: usize) void {
+ const s = section(owner);
+ if (index >= s.presets.len) return;
+ @import("../../config_runtime/theme_pack.zig").apply(s.cc.server, s.presets[index].id) catch |err| {
+ std.log.warn("apply theme pack: {s}", .{@errorName(err)});
+ };
}
/// Gives the taskbar the colours of the picked preset (index 0 hands it back
@@ -1215,10 +1338,7 @@ fn onTaskbarThemePicked(owner: ?*anyopaque, _: usize, index: usize) void {
// Only the colour tokens are kept, so nothing outlives this arena.
var scratch: std.heap.ArenaAllocator = .init(main.gpa);
defer scratch.deinit();
- const parsed = theme.parse(scratch.allocator(), preset.bytes) catch |err| {
- std.log.warn("taskbar theme '{s}' failed to parse: {}", .{ preset.name, err });
- return;
- };
+ const parsed = preset.tokens;
theme.taskbar_override = theme.taskbarTokens(parsed);
}
if (server.config.path.len > 0) loader.replaceTaskbarThemeSection(main.gpa, server.io, server.config.path, theme.taskbar_override);
@@ -1231,7 +1351,7 @@ fn onFontFamilyChanged(owner: ?*anyopaque, _: usize, index: usize) void {
const families = s.font_families orelse return;
if (index >= families.len or std.mem.eql(u8, theme.global.font, families[index])) return;
// Theme strings outlive the panel, matching theme.parse's ownership.
- theme.global.font = main.gpa.dupe(u8, families[index]) catch return;
+ theme.global.font = s.cc.server.config.arena.allocator().dupe(u8, families[index]) catch return;
applyThemeChangeImpl(section(owner), true);
{
const server = section(owner).cc.server;
diff --git a/src/cursor_theme.zig b/src/cursor_theme.zig
index 173f0e1..46f51cf 100644
--- a/src/cursor_theme.zig
+++ b/src/cursor_theme.zig
@@ -26,8 +26,9 @@ pub fn init(allocator: std.mem.Allocator, io: std.Io) void {
if (bundled_dir) |old| allocator.free(old);
bundled_dir = icons;
const inherited = if (std.c.getenv("XCURSOR_PATH")) |p| std.mem.span(p) else default_path;
- if (containsDir(inherited, icons)) return;
- const value = std.fmt.allocPrintSentinel(allocator, "{s}:{s}", .{ icons, inherited }, 0) catch return;
+ const user_icons = if (std.c.getenv("XDG_DATA_HOME")) |data| std.fmt.allocPrint(allocator, "{s}/icons", .{std.mem.span(data)}) catch return else allocator.dupe(u8, "~/.local/share/icons") catch return;
+ defer allocator.free(user_icons);
+ const value = std.fmt.allocPrintSentinel(allocator, "{s}:{s}:{s}", .{ icons, user_icons, inherited }, 0) catch return;
if (setenv("XCURSOR_PATH", value.ptr, 1) != 0) {
allocator.free(value);
return;
diff --git a/src/desktop/watcher.zig b/src/desktop/watcher.zig
index 219f4c1..1869c62 100644
--- a/src/desktop/watcher.zig
+++ b/src/desktop/watcher.zig
@@ -47,11 +47,18 @@ pub const Launched = struct {
/// White glyph from the shell icon set, centred in a transparent square so it
/// sits in the same box as the themed icons. Rasters live for the process,
/// like `icon_cache`'s, because snapshots only borrow their pixels.
-var builtin_icons: [8]?struct { glyph: @import("ui").layout.IconId, entry: icons.Entry } = @splat(null);
-fn builtinIcon(glyph: @import("ui").layout.IconId, size: i32) ?icons.Entry {
- for (builtin_icons) |slot| if (slot) |s| if (s.glyph == glyph and s.entry.size == size) return s.entry;
+const BuiltinIcon = struct { glyph: @import("ui").layout.IconId, entry: icons.Entry, generation: u64 };
+var builtin_icons: std.ArrayList(BuiltinIcon) = .empty;
+pub fn deinitIcons() void {
+ for (builtin_icons.items) |slot| a.free(slot.entry.pixels);
+ builtin_icons.deinit(a);
+ builtin_icons = .empty;
+}
+fn builtinIcon(glyph: @import("ui").layout.IconId, size: i32, generation: u64) ?icons.Entry {
+ for (builtin_icons.items) |s| if (s.glyph == glyph and s.entry.size == size and s.generation == generation) return s.entry;
const inner = @divTrunc(size * 3, 4);
- const mask = @import("ui").shell_icons.get(glyph, inner) orelse return null;
+ const mask = @import("ui").shell_icons.getOwned(glyph, inner) orelse return null;
+ defer a.free(mask.alpha);
const n: usize = @intCast(size);
const pixels = a.alloc(u32, n * n) catch return null;
@memset(pixels, 0);
@@ -62,9 +69,9 @@ fn builtinIcon(glyph: @import("ui").layout.IconId, size: i32) ?icons.Entry {
pixels[(y + pad) * n + x + pad] = v << 24 | v << 16 | v << 8 | v; // premultiplied white
};
const entry = icons.Entry{ .pixels = pixels, .size = size };
- for (&builtin_icons) |*slot| if (slot.* == null) {
- slot.* = .{ .glyph = glyph, .entry = entry };
- break;
+ builtin_icons.append(a, .{ .glyph = glyph, .entry = entry, .generation = generation }) catch {
+ a.free(pixels);
+ return null;
};
return entry;
}
@@ -76,6 +83,8 @@ pub const Worker = struct {
dir: []const u8,
layout: []const u8,
theme_cfg: theme.Config,
+ pending_theme: ?theme.Config = null,
+ theme_owned: bool = false,
mutex: c.pthread_mutex_t = undefined,
pending: ?*Snapshot = null,
error_message: [256]u8 = undefined,
@@ -137,6 +146,14 @@ pub const Worker = struct {
self.commands.deinit(a);
self.catalog_arena.deinit();
if (self.pending_child_env) |*env| env.deinit();
+ if (self.pending_theme) |cfg| {
+ a.free(cfg.theme_name);
+ a.free(cfg.override_root);
+ }
+ if (self.theme_owned) {
+ a.free(self.theme_cfg.theme_name);
+ a.free(self.theme_cfg.override_root);
+ }
self.child_env.deinit();
for (self.theme_cfg.base_dirs) |d| a.free(d);
a.free(self.theme_cfg.base_dirs);
@@ -165,6 +182,25 @@ pub const Worker = struct {
}
/// Asks the worker to rescan from the Wayland thread.
+ pub fn updateTheme(self: *Worker, cfg: theme.Config) void {
+ var next = cfg;
+ next.theme_name = a.dupe(u8, cfg.theme_name) catch return;
+ next.override_root = a.dupe(u8, cfg.override_root) catch {
+ a.free(next.theme_name);
+ return;
+ };
+ // The worker's original search roots have process lifetime.
+ next.base_dirs = self.theme_cfg.base_dirs;
+ _ = c.pthread_mutex_lock(&self.mutex);
+ if (self.pending_theme) |old| {
+ a.free(old.theme_name);
+ a.free(old.override_root);
+ }
+ self.pending_theme = next;
+ _ = c.pthread_mutex_unlock(&self.mutex);
+ self.requestRefresh();
+ }
+
pub fn requestRefresh(self: *Worker) void {
self.refresh.store(true, .release);
signal(self.wake_worker);
@@ -249,9 +285,21 @@ pub const Worker = struct {
.{ .kind = .home, .name = "Home", .path = home, .glyph = .home },
.{ .kind = .trash, .name = "Trash", .path = trash_files, .glyph = .trash_can },
};
- for (entries) |e| try list.append(mem, .{ .path = try mem.dupe(u8, e.path), .name = e.name, .icon = builtinIcon(e.glyph, size), .folder = true, .cell = config.lookup(mem, saved, e.path), .builtin = e.kind });
+ for (entries) |e| try list.append(mem, .{ .path = try mem.dupe(u8, e.path), .name = e.name, .icon = icons.get(self.theme_cfg, self.io, if (e.kind == .home) "user-home" else "user-trash", size) orelse builtinIcon(e.glyph, size, self.theme_cfg.generation), .folder = true, .cell = config.lookup(mem, saved, e.path), .builtin = e.kind });
}
fn scan(self: *Worker) !*Snapshot {
+ _ = c.pthread_mutex_lock(&self.mutex);
+ if (self.pending_theme) |next| {
+ if (self.theme_owned) {
+ a.free(self.theme_cfg.theme_name);
+ a.free(self.theme_cfg.override_root);
+ }
+ self.theme_cfg = next;
+ self.theme_owned = true;
+ self.pending_theme = null;
+ }
+ _ = c.pthread_mutex_unlock(&self.mutex);
+
const snap = try a.create(Snapshot);
snap.* = .{ .arena = std.heap.ArenaAllocator.init(a), .items = &.{} };
errdefer snap.destroy();
@@ -290,7 +338,7 @@ pub const Worker = struct {
const resolved = if (entry.kind == .sym_link) c.realpath(path, null) else null;
defer if (resolved != null) c.free(resolved);
const target_name = if (resolved != null) std.mem.span(resolved) else entry.name;
- var icon_name: []const u8 = if (folder) "folder" else mimeIcon(target_name);
+ var icon_name: []const u8 = if (folder) theme.folderName(mem, self.io, self.environ, path) else mimeIcon(target_name);
if (!folder and std.mem.endsWith(u8, target_name, ".desktop")) {
const content = std.Io.Dir.cwd().readFileAlloc(self.io, path, mem, .limited(512 * 1024)) catch continue;
const parsed = desktop.parse(mem, content, desktop.Locale.fromEnv(self.environ)) orelse continue;
@@ -306,6 +354,7 @@ pub const Worker = struct {
}
}
item.icon = icons.get(self.theme_cfg, self.io, icon_name, self.icon_size.load(.acquire));
+ if (item.icon == null and folder) item.icon = icons.get(self.theme_cfg, self.io, "folder", self.icon_size.load(.acquire));
try list.append(mem, item);
}
std.mem.sort(Item, list.items, {}, struct {
diff --git a/src/files/app.zig b/src/files/app.zig
index 3d45df3..f1c8799 100644
--- a/src/files/app.zig
+++ b/src/files/app.zig
@@ -461,6 +461,9 @@ pub const App = struct {
.thumbs_enabled = !thumb_decode.disabled(environ),
};
+ self.theme_cfg.override_root = @import("settings.zig").iconRoot();
+ const icon_base = @import("settings.zig").iconTheme();
+ if (icon_base.len > 0) self.theme_cfg.theme_name = icon_base;
const data_home = environ.getPosix("XDG_DATA_HOME");
self.trash_dir = if (data_home != null and std.fs.path.isAbsolute(data_home.?))
try std.fs.path.join(allocator, &.{ data_home.?, "Trash", "files" })
@@ -989,6 +992,10 @@ pub const App = struct {
}
pub fn sync(self: *App) void {
+ if (self.worker.takeThemeNotice()) |notice| {
+ defer self.worker.allocator.free(notice);
+ self.setStatusNotice(notice, false);
+ }
self.syncFolderSizes();
_ = c.pthread_mutex_lock(&self.worker.mutex);
const animation_settings = self.worker.animation_settings;
@@ -997,6 +1004,11 @@ pub const App = struct {
_ = c.pthread_mutex_unlock(&self.worker.mutex);
if (new_theme) |t| {
t.apply();
+ self.theme_cfg.override_root = @import("settings.zig").iconRoot();
+ const base = @import("settings.zig").iconTheme();
+ self.theme_cfg.theme_name = if (base.len > 0) base else if (std.c.getenv("REDIWM_ICON_THEME")) |name| std.mem.span(name) else "Adwaita";
+ self.theme_cfg.generation += 1;
+ theme.forgetParsedThemes(icons.gpa);
self.invalidate();
}
if (!anim.currentSettings().eql(animation_settings)) {
@@ -3659,6 +3671,11 @@ pub const App = struct {
pub fn openFile(self: *App, path: []const u8) void {
if (self.chooser != null) return;
+ if (std.ascii.endsWithIgnoreCase(path, ".rediwm-theme")) {
+ self.worker.installTheme(path);
+ self.setStatusNotice("Installing theme…", false);
+ return;
+ }
const pdf = isPdf(path) and !@import("associations.zig").hasAlternativeDefault(path, "rediwm-pdf.desktop");
if (!pdf) {
@import("associations.zig").launchDefault(path) catch |err| {
@@ -5834,7 +5851,8 @@ pub const App = struct {
for (item.icon_candidates) |name| {
if (icons.get(self.theme_cfg, self.io, name, raster_size)) |entry| return entry;
}
- return icons.get(self.theme_cfg, self.io, item.icon_name, raster_size);
+ if (icons.get(self.theme_cfg, self.io, item.icon_name, raster_size)) |entry| return entry;
+ return if (item.is_dir) icons.get(self.theme_cfg, self.io, "folder", raster_size) else null;
}
pub fn drawItemIcon(self: *App, cr: *c.cairo_t, item: ViewItem, x: f64, y: f64, size: f64) void {
@@ -5853,7 +5871,7 @@ pub const App = struct {
}
}
const raster_size = @as(i32, @intFromFloat(size)) * self.scale;
- const maybe_icon = if (item.is_dir) null else self.itemIcon(item, raster_size);
+ const maybe_icon = self.itemIcon(item, raster_size);
if (maybe_icon) |entry| {
const surf = c.cairo_image_surface_create_for_data(
diff --git a/src/files/settings.zig b/src/files/settings.zig
index ef89b6f..62d15d4 100644
--- a/src/files/settings.zig
+++ b/src/files/settings.zig
@@ -14,8 +14,11 @@ pub const ThemeUpdate = struct {
value: theme.Theme,
allocator: std.mem.Allocator,
region: config.RegionConfig = .{},
+ pack_root: []const u8 = "",
+ icon_theme: []const u8 = "",
+ io: std.Io,
- fn init(a: std.mem.Allocator, t: theme.Theme, prefs: config.RegionConfig) !ThemeUpdate {
+ fn init(a: std.mem.Allocator, t: theme.Theme, prefs: config.RegionConfig, root: []const u8, icon_name: []const u8, io: std.Io) !ThemeUpdate {
var value = t;
value.font = try a.dupe(u8, t.font);
errdefer a.free(value.font);
@@ -29,10 +32,16 @@ pub const ThemeUpdate = struct {
owned.language = try a.dupe(u8, prefs.language);
errdefer a.free(owned.language);
owned.formats = try a.dupe(u8, prefs.formats);
- return .{ .value = value, .allocator = a, .region = owned };
+ errdefer a.free(owned.formats);
+ const pack_root = try a.dupe(u8, root);
+ errdefer a.free(pack_root);
+ const icon_theme = try a.dupe(u8, icon_name);
+ return .{ .value = value, .allocator = a, .region = owned, .pack_root = pack_root, .icon_theme = icon_theme, .io = io };
}
pub fn deinit(self: ThemeUpdate) void {
+ self.allocator.free(self.icon_theme);
+ self.allocator.free(self.pack_root);
self.allocator.free(self.value.font);
self.allocator.free(self.value.mono_font);
self.allocator.free(self.value.start_button_icon);
@@ -43,6 +52,7 @@ pub const ThemeUpdate = struct {
/// Transfers ownership to the UI thread. Never call from a worker.
pub fn apply(self: ThemeUpdate) void {
+ @import("ui").shell_icons.configure(self.io, self.pack_root);
theme.global = self.value;
region = self.region;
text.setPreferredFamilies(self.value.font, self.value.mono_font);
@@ -55,6 +65,7 @@ var applied_theme: ?ThemeUpdate = null;
var region: config.RegionConfig = .{};
pub fn deinitTheme() void {
+ @import("ui").shell_icons.deinitPack();
theme.global = .{};
region = .{};
if (applied_theme) |t| t.deinit();
@@ -62,6 +73,7 @@ pub fn deinitTheme() void {
}
pub const Settings = struct {
+ env: ?std.process.Environ = null,
config_path: ?[:0]const u8 = null,
theme_path: ?[:0]const u8 = null,
stamps: [2]?Stamp = .{ null, null },
@@ -75,7 +87,7 @@ pub const Settings = struct {
pub fn init(a: std.mem.Allocator, env: std.process.Environ) !Settings {
const path = @import("config").path.resolvePath(env, a) catch null;
defer if (path) |p| a.free(p);
- var self: Settings = .{};
+ var self: Settings = .{ .env = env };
errdefer self.deinit(a);
if (path) |p| self.config_path = try a.dupeZ(u8, p);
if (theme.resolvePath(env)) |p| self.theme_path = try a.dupeZ(u8, p);
@@ -110,6 +122,8 @@ pub const Settings = struct {
var arena = std.heap.ArenaAllocator.init(a);
defer arena.deinit();
var t: theme.Theme = .{};
+ var icon_name: []const u8 = "";
+ var root: []const u8 = "";
var prefs: config.RegionConfig = .{};
self.animations = .{};
self.region = .{};
@@ -118,9 +132,17 @@ pub const Settings = struct {
const bytes = std.Io.Dir.cwd().readFileAlloc(io, p, arena.allocator(), .limited(1 << 20)) catch continue;
if (i == 0) {
self.animations = parseAnimations(bytes);
- var cfg = config.parse(arena.allocator(), bytes, p) catch null;
+ var cfg = if (self.env) |env| config.loadFromBytes(arena.allocator(), bytes, p, env, io) catch null else config.parse(arena.allocator(), bytes, p) catch null;
if (cfg) |*value| {
defer value.deinit();
+ icon_name = value.compositor.icon_theme;
+ if (value.theme_pack) |pack| if (pack.icon_theme.len > 0) {
+ icon_name = pack.icon_theme;
+ };
+ icon_name = arena.allocator().dupe(u8, icon_name) catch return null;
+ t = value.theme;
+ if (value.theme_pack) |pack| root = arena.allocator().dupe(u8, pack.root) catch return null;
+ inline for (.{ "font", "mono_font", "start_button_icon" }) |field| @field(t, field) = arena.allocator().dupe(u8, @field(t, field)) catch return null;
prefs = value.region;
prefs.timezone = arena.allocator().dupe(u8, prefs.timezone) catch return null;
prefs.language = arena.allocator().dupe(u8, prefs.language) catch return null;
@@ -134,7 +156,7 @@ pub const Settings = struct {
// Settings only retains scalar preferences; returned updates own strings.
self.region.clock_24h = prefs.clock_24h;
self.region.first_day_of_week = prefs.first_day_of_week;
- return ThemeUpdate.init(a, t, prefs) catch null;
+ return ThemeUpdate.init(a, t, prefs, root, icon_name, io) catch null;
}
};
@@ -280,3 +302,10 @@ test "Files reads the shell wheel animation and reduced motion settings" {
try std.testing.expectEqual(anim.ReducedMotion.on, settings.reduced_motion);
try std.testing.expect(settings.targets[@intFromEnum(anim.Target.wheel_scroll)].curve == .off);
}
+
+pub fn iconRoot() []const u8 {
+ return if (applied_theme) |t| t.pack_root else "";
+}
+pub fn iconTheme() []const u8 {
+ return if (applied_theme) |t| t.icon_theme else "";
+}
diff --git a/src/files/worker.zig b/src/files/worker.zig
index c0928a8..18c1af2 100644
--- a/src/files/worker.zig
+++ b/src/files/worker.zig
@@ -69,6 +69,8 @@ pub const Worker = struct {
request_id: u64 = 1,
pending_snapshot: ?*Snapshot = null,
opened_paths: std.ArrayList([]u8) = .empty,
+ theme_installs: std.ArrayList([]u8) = .empty,
+ theme_notice: ?[]u8 = null,
/// Signalled after each request so the worker sleeps between them
/// instead of polling on an 80 ms clock.
wake: c_int = -1,
@@ -117,6 +119,9 @@ pub const Worker = struct {
if (self.theme) |t| t.deinit();
for (self.opened_paths.items) |p| self.allocator.free(p);
self.opened_paths.deinit(self.allocator);
+ for (self.theme_installs.items) |p| self.allocator.free(p);
+ self.theme_installs.deinit(self.allocator);
+ if (self.theme_notice) |p| self.allocator.free(p);
for (self.theme_cfg.base_dirs) |d| self.allocator.free(d);
self.allocator.free(self.theme_cfg.base_dirs);
@@ -129,6 +134,39 @@ pub const Worker = struct {
return self.navigateLocation(new_dir, show_hidden, 0);
}
+ pub fn installTheme(self: *Worker, path: []const u8) void {
+ _ = c.pthread_mutex_lock(&self.mutex);
+ defer _ = c.pthread_mutex_unlock(&self.mutex);
+ const owned = self.allocator.dupe(u8, path) catch return;
+ self.theme_installs.append(self.allocator, owned) catch {
+ self.allocator.free(owned);
+ return;
+ };
+ self.signal();
+ }
+ pub fn takeThemeNotice(self: *Worker) ?[]u8 {
+ _ = c.pthread_mutex_lock(&self.mutex);
+ defer _ = c.pthread_mutex_unlock(&self.mutex);
+ const notice = self.theme_notice;
+ self.theme_notice = null;
+ return notice;
+ }
+ fn processTheme(self: *Worker, path: []const u8) void {
+ var arena = std.heap.ArenaAllocator.init(self.allocator);
+ defer arena.deinit();
+ const mem = arena.allocator();
+ const exe_dir = std.process.executableDirPathAlloc(self.io, mem) catch return;
+ const helper = std.fs.path.join(mem, &.{ exe_dir, "rediwm-theme" }) catch return;
+ const result = std.process.run(mem, self.io, .{ .argv = &.{ helper, "install", path }, .stdout_limit = .limited(4096), .stderr_limit = .limited(16384), .timeout = .{ .duration = .{ .raw = .fromSeconds(30), .clock = .awake } } }) catch return;
+ const success = result.term == .exited and result.term.exited == 0;
+ const message = self.allocator.dupe(u8, if (success) "Theme installed. Choose it in Settings → Appearance." else result.stderr) catch return;
+ _ = c.pthread_mutex_lock(&self.mutex);
+ if (self.theme_notice) |old| self.allocator.free(old);
+ self.theme_notice = message;
+ _ = c.pthread_mutex_unlock(&self.mutex);
+ notify(self.wake_main);
+ }
+
pub fn recordOpened(self: *Worker, path: []const u8) void {
_ = c.pthread_mutex_lock(&self.mutex);
defer _ = c.pthread_mutex_unlock(&self.mutex);
@@ -217,9 +255,17 @@ pub const Worker = struct {
while (true) {
_ = c.pthread_mutex_lock(&self.mutex);
+ const installs = self.theme_installs;
+ self.theme_installs = .empty;
const opened = self.opened_paths;
self.opened_paths = .empty;
_ = c.pthread_mutex_unlock(&self.mutex);
+ for (installs.items) |p| {
+ self.processTheme(p);
+ self.allocator.free(p);
+ }
+ var install_storage = installs;
+ install_storage.deinit(self.allocator);
for (opened.items) |p| {
recent.record(self.allocator, self.io, self.environ, p) catch {};
self.allocator.free(p);
@@ -449,6 +495,7 @@ pub const Worker = struct {
if (item.is_dir or item.is_broken or (item.mode & c.S_IFMT != c.S_IFREG and !item.is_symlink)) continue;
item.opened = entry.opened;
seen.put(mem, entry.path, {}) catch continue;
+ if (item.is_dir) item.icon_name = theme.folderName(mem, self.io, self.environ, item.path);
list.append(mem, item) catch continue;
}
snap.items = list.toOwnedSlice(mem) catch &.{};
@@ -474,7 +521,8 @@ pub const Worker = struct {
while (it.next(self.io) catch null) |entry| {
if (!show_hidden and std.mem.startsWith(u8, entry.name, ".")) continue;
const full_path = std.fmt.allocPrintSentinel(mem, "{s}/{s}", .{ dir_path, entry.name }, 0) catch continue;
- const item = statItem(mem, &owners, &associations, entry.name, full_path) orelse continue;
+ var item = statItem(mem, &owners, &associations, entry.name, full_path) orelse continue;
+ if (item.is_dir) item.icon_name = theme.folderName(mem, self.io, self.environ, item.path);
list.append(mem, item) catch continue;
}
diff --git a/src/icon_cache.zig b/src/icon_cache.zig
index 4e473bc..4c1fe68 100644
--- a/src/icon_cache.zig
+++ b/src/icon_cache.zig
@@ -55,6 +55,8 @@ pub const Entry = struct {
size: i32,
};
+const pthread = std.posix.system;
+var cache_mutex: pthread.pthread_mutex_t = pthread.PTHREAD_MUTEX_INITIALIZER;
var cache: std.StringHashMapUnmanaged(?Entry) = .empty;
// Keyed by "<size_px>:<icon_name>", not name alone: the taskbar and the
@@ -65,10 +67,12 @@ var cache: std.StringHashMapUnmanaged(?Entry) = .empty;
// "looked up, not found" so a repeatedly-unmatched app_id doesn't re-walk
// the filesystem on every caller.
pub fn get(cfg: icon_theme.Config, io: Io, icon_name: []const u8, size_px: i32) ?Entry {
+ _ = pthread.pthread_mutex_lock(&cache_mutex);
+ defer _ = pthread.pthread_mutex_unlock(&cache_mutex);
if (icon_name.len == 0) return null;
var key_buf: [512]u8 = undefined;
- const key = std.fmt.bufPrint(&key_buf, "{d}:{s}", .{ size_px, icon_name }) catch
+ const key = std.fmt.bufPrint(&key_buf, "{d}:{d}:{s}", .{ cfg.generation, size_px, icon_name }) catch
return lookup(cfg, io, icon_name, size_px) catch null;
if (cache.get(key)) |entry| return entry;
@@ -104,7 +108,8 @@ pub fn lookup(cfg: icon_theme.Config, io: Io, icon_name: []const u8, size_px: i3
if (is_svg) {
const zpath = gpa.dupeZ(u8, icon_name) catch return null;
defer gpa.free(zpath);
- const pixels = rasterizeSvg(zpath, size_px) orelse return null;
+ const in_pack = cfg.override_root.len > 0 and std.mem.startsWith(u8, icon_name, cfg.override_root) and icon_name.len > cfg.override_root.len and icon_name[cfg.override_root.len] == '/';
+ const pixels = (if (in_pack) rasterizePackSvg(zpath, io, size_px) else rasterizeSvg(zpath, size_px)) orelse return null;
return Entry{ .pixels = pixels, .size = size_px };
} else if (is_png) {
const zpath = gpa.dupeZ(u8, icon_name) catch return null;
@@ -135,7 +140,7 @@ pub fn lookup(cfg: icon_theme.Config, io: Io, icon_name: []const u8, size_px: i3
defer gpa.free(found.path);
if (found.svg) {
- const pixels = rasterizeSvg(found.path, size_px) orelse return null;
+ const pixels = (if (found.pack) rasterizePackSvg(found.path, io, size_px) else rasterizeSvg(found.path, size_px)) orelse return null;
return Entry{ .pixels = pixels, .size = size_px };
}
@@ -407,3 +412,24 @@ test "decode palette PNG via cairo fallback" {
}
}
}
+
+fn rasterizePackSvg(path: [:0]const u8, io: Io, size: i32) ?[]u32 {
+ const bytes = Io.Dir.cwd().readFileAlloc(io, path, gpa, .limited(512 * 1024)) catch return null;
+ defer gpa.free(bytes);
+ var err: ?*GError = null;
+ defer if (err) |e| g_error_free(e);
+ const handle = rsvg_handle_new_from_data(bytes.ptr, bytes.len, &err) orelse return null;
+ defer g_object_unref(handle);
+ return renderSvg(handle, size);
+}
+
+pub fn deinit() void {
+ var it = cache.iterator();
+ while (it.next()) |entry| {
+ if (entry.value_ptr.*) |value| gpa.free(value.pixels);
+ gpa.free(entry.key_ptr.*);
+ }
+ cache.deinit(gpa);
+ cache = .empty;
+ icon_theme.forgetParsedThemes(gpa);
+}
diff --git a/src/icon_service.zig b/src/icon_service.zig
index dfbf77b..6c4a233 100644
--- a/src/icon_service.zig
+++ b/src/icon_service.zig
@@ -114,6 +114,7 @@ pub const IconService = struct {
published: std.StringHashMapUnmanaged(Published) = .empty,
id_to_key: std.AutoHashMapUnmanaged(u64, []const u8) = .empty,
next_id: u64 = 1,
+ owns_config: bool = false,
unpinned_bytes: usize = 0, // sum of .bytes over published entries with refcount == 0
touch_clock: u64 = 0,
@@ -168,6 +169,10 @@ pub const IconService = struct {
self.published.deinit(self.allocator);
self.id_to_key.deinit(self.allocator);
+ if (self.owns_config) {
+ self.allocator.free(self.cfg.theme_name);
+ self.allocator.free(self.cfg.override_root);
+ }
self.allocator.destroy(self);
}
@@ -234,7 +239,7 @@ pub const IconService = struct {
/// Essential priority: never budget-gated. See `prefetch` for the
/// speculative counterpart.
pub fn request(self: *IconService, name: []const u8, size_px: i32) Lookup {
- if (name.len == 0) return .missing;
+ if (name.len == 0 or !self.running) return .missing;
var buf: [512]u8 = undefined;
const key = formatKey(&buf, size_px, name) orelse return .missing;
@@ -296,6 +301,41 @@ pub const IconService = struct {
/// since-evicted id as a no-op (see their tests), so the stale id each
/// consumer is still holding just becomes inert until its next
/// `syncChrome`/repaint re-requests and re-pins the fresh entry.
+ /// Stop the single decoder before changing its paths or index cache. The
+ /// eventfd and published IDs survive, so hosts keep their subscriptions.
+ pub fn reconfigure(self: *IconService, cfg: icon_theme.Config) !void {
+ var transferred = false;
+ const name = try self.allocator.dupe(u8, cfg.theme_name);
+ errdefer if (!transferred) self.allocator.free(name);
+ const root = try self.allocator.dupe(u8, cfg.override_root);
+ errdefer if (!transferred) self.allocator.free(root);
+ self.lock();
+ self.running = false;
+ self.dropQueuedLocked(&self.job_queue_essential);
+ self.dropQueuedLocked(&self.job_queue_speculative);
+ self.broadcast();
+ self.unlock();
+ if (self.thread) |t| t.join();
+ self.thread = null;
+ self.drainCompletions();
+ self.freeAllPublished();
+ icon_theme.forgetParsedThemes(icon_cache.gpa);
+ if (self.owns_config) {
+ self.allocator.free(self.cfg.theme_name);
+ self.allocator.free(self.cfg.override_root);
+ }
+ self.cfg = cfg;
+ self.cfg.theme_name = name;
+ self.cfg.override_root = root;
+ self.owns_config = true;
+ transferred = true;
+ self.running = true;
+ self.thread = std.Thread.spawn(.{}, run, .{self}) catch |err| {
+ self.running = false;
+ return err;
+ };
+ }
+
pub fn invalidateAll(self: *IconService) void {
self.freeAllPublished();
}
diff --git a/src/icon_theme.zig b/src/icon_theme.zig
index b0af90f..273f175 100644
--- a/src/icon_theme.zig
+++ b/src/icon_theme.zig
@@ -12,8 +12,13 @@ const std = @import("std");
const Allocator = std.mem.Allocator;
const Io = std.Io;
+const pthread = std.posix.system;
+var index_mutex: pthread.pthread_mutex_t = pthread.PTHREAD_MUTEX_INITIALIZER;
+
pub const Config = struct {
theme_name: []const u8,
+ override_root: []const u8 = "",
+ generation: u64 = 0,
base_dirs: []const []const u8,
};
@@ -62,6 +67,7 @@ pub const Found = struct {
// coerces fine everywhere else (readFileAlloc, allocator.free, ...).
path: [:0]u8,
svg: bool,
+ pack: bool = false,
};
const IconExt = enum { png, svg };
@@ -102,6 +108,18 @@ const Theme = struct {
// theme -> theme's Inherits (recursive, deduped) -> "hicolor" (mandatory
// fallback even if undeclared) -> flat /usr/share/pixmaps.
pub fn find(allocator: Allocator, io: Io, cfg: Config, icon_name: []const u8, target_px: i32) !?Found {
+ _ = pthread.pthread_mutex_lock(&index_mutex);
+ defer _ = pthread.pthread_mutex_unlock(&index_mutex);
+ if (cfg.override_root.len > 0 and @import("config").theme_pack.relative(icon_name) and std.mem.indexOfScalar(u8, icon_name, '/') == null) {
+ for ([_][]const u8{ "svg", "png" }) |ext| {
+ const rel = try std.fmt.allocPrint(allocator, "icons/{s}.{s}", .{ icon_name, ext });
+ defer allocator.free(rel);
+ if (@import("config").theme_pack.asset(allocator, io, cfg.override_root, rel)) |path| {
+ defer allocator.free(path);
+ return .{ .path = try allocator.dupeZ(u8, path), .svg = std.mem.eql(u8, ext, "svg"), .pack = true };
+ } else |_| {}
+ }
+ }
// Every theme-name string this call ever allocates (Inherits= entries),
// freed once at the end. `pending`/`visited` below only ever hold slices
// borrowed from here or from `cfg.theme_name`, so nothing can dangle.
@@ -166,9 +184,11 @@ var parsed_themes: std.StringHashMapUnmanaged(?Theme) = .empty;
/// Borrowed from `parsed_themes`; the caller must not deinit the result.
fn themeIndex(allocator: Allocator, io: Io, cfg: Config, theme_name: []const u8) !?Theme {
- if (parsed_themes.get(theme_name)) |cached| return cached;
+ const cache_name = try std.fmt.allocPrint(allocator, "{d}:{s}", .{ cfg.generation, theme_name });
+ defer allocator.free(cache_name);
+ if (parsed_themes.get(cache_name)) |cached| return cached;
- const key = try allocator.dupe(u8, theme_name);
+ const key = try allocator.dupe(u8, cache_name);
errdefer allocator.free(key);
const parsed = try loadThemeIndex(allocator, io, cfg, theme_name);
errdefer if (parsed) |theme| theme.deinit(allocator);
@@ -179,6 +199,8 @@ fn themeIndex(allocator: Allocator, io: Io, cfg: Config, theme_name: []const u8)
/// Drop every parsed index. Only needed if the icon theme configuration ever
/// becomes changeable at runtime; nothing calls it today.
pub fn forgetParsedThemes(allocator: Allocator) void {
+ _ = pthread.pthread_mutex_lock(&index_mutex);
+ defer _ = pthread.pthread_mutex_unlock(&index_mutex);
var it = parsed_themes.iterator();
while (it.next()) |entry| {
allocator.free(entry.key_ptr.*);
@@ -548,3 +570,57 @@ test "theme section index preserves declared order and first duplicate" {
try std.testing.expectEqualStrings("small", parsed.dirs[1].path);
try std.testing.expectEqual(@as(i32, 16), parsed.dirs[1].size);
}
+
+/// Installed icon-theme names for the explicit Appearance picker.
+pub fn listNames(a: Allocator, io: Io, cfg: Config) ![][]const u8 {
+ var out: std.ArrayList([]const u8) = .empty;
+ try out.append(a, "");
+ for (cfg.base_dirs) |base| {
+ var dir = Io.Dir.cwd().openDir(io, base, .{ .iterate = true }) catch continue;
+ defer dir.close(io);
+ var it = dir.iterate();
+ while (try it.next(io)) |entry| {
+ if (entry.kind != .directory or !@import("config").theme_pack.relative(entry.name)) continue;
+ var found = false;
+ for (out.items) |name| if (std.mem.eql(u8, name, entry.name)) {
+ found = true;
+ };
+ if (found) continue;
+ const index = try std.fs.path.join(a, &.{ base, entry.name, "index.theme" });
+ Io.Dir.cwd().access(io, index, .{}) catch continue;
+ try out.append(a, try a.dupe(u8, entry.name));
+ }
+ }
+ std.mem.sort([]const u8, out.items[1..], {}, struct {
+ fn less(_: void, x: []const u8, y: []const u8) bool {
+ return std.ascii.lessThanIgnoreCase(x, y);
+ }
+ }.less);
+ return out.toOwnedSlice(a);
+}
+
+/// XDG special-directory identity, shared by Files and the desktop. Call at
+/// scan time so reading user-dirs.dirs never enters the paint path.
+pub fn folderName(a: Allocator, io: Io, env: std.process.Environ, path: []const u8) []const u8 {
+ const home = env.getPosix("HOME") orelse return "folder";
+ if (std.mem.eql(u8, path, home)) return "user-home";
+ const data = env.getPosix("XDG_DATA_HOME") orelse (std.fs.path.join(a, &.{ home, ".local/share" }) catch return "folder");
+ const trash = std.fs.path.join(a, &.{ data, "Trash/files" }) catch return "folder";
+ if (std.mem.eql(u8, path, trash)) return "user-trash";
+ const config_home = env.getPosix("XDG_CONFIG_HOME") orelse (std.fs.path.join(a, &.{ home, ".config" }) catch return "folder");
+ const file = std.fs.path.join(a, &.{ config_home, "user-dirs.dirs" }) catch return "folder";
+ const bytes = Io.Dir.cwd().readFileAlloc(io, file, a, .limited(64 * 1024)) catch "";
+ var lines = std.mem.splitScalar(u8, bytes, '\n');
+ while (lines.next()) |raw| {
+ const line = std.mem.trim(u8, raw, " \t\r");
+ const eq = std.mem.indexOfScalar(u8, line, '=') orelse continue;
+ const key = std.mem.trim(u8, line[0..eq], " \t");
+ const value = @import("ui").theme.unquote(std.mem.trim(u8, line[eq + 1 ..], " \t")) catch continue;
+ const full = if (std.mem.startsWith(u8, value, "$HOME/")) (std.fs.path.join(a, &.{ home, value[6..] }) catch continue) else value;
+ if (!std.mem.eql(u8, path, full)) continue;
+ const keys = [_][]const u8{ "XDG_DESKTOP_DIR", "XDG_DOCUMENTS_DIR", "XDG_DOWNLOAD_DIR", "XDG_MUSIC_DIR", "XDG_PICTURES_DIR", "XDG_VIDEOS_DIR", "XDG_TEMPLATES_DIR", "XDG_PUBLICSHARE_DIR" };
+ const names = [_][]const u8{ "user-desktop", "folder-documents", "folder-download", "folder-music", "folder-pictures", "folder-videos", "folder-templates", "folder-publicshare" };
+ for (keys, names) |k, name| if (std.mem.eql(u8, key, k)) return name;
+ }
+ return "folder";
+}
diff --git a/src/ipc/commands.zig b/src/ipc/commands.zig
index a21fadb..211ff2f 100644
--- a/src/ipc/commands.zig
+++ b/src/ipc/commands.zig
@@ -39,13 +39,17 @@ pub const CommandSpec = struct {
/// on (`IpcServer.automation`).
automation: bool = false,
+ wire_name: ?[]const u8 = null,
pub fn wire(comptime self: CommandSpec) []const u8 {
- return @tagName(self.id);
+ return self.wire_name orelse @tagName(self.id);
}
};
// Canonical v1 names and internal parameter-parser routes.
pub const specs = [_]CommandSpec{
+ .{ .id = .theme_list, .wire_name = "theme.list", .kind = .query, .description = "List installed and embedded theme packs", .params_schema = "{}", .description_order = 107 },
+ .{ .id = .theme_apply, .wire_name = "theme.apply", .kind = .action, .description = "Apply a pack and clear appearance overrides", .params_schema = "{\"id\":string}", .description_order = 108 },
+ .{ .id = .theme_install, .wire_name = "theme.install", .kind = .action, .description = "Install a theme ZIP or directory using the isolated helper", .params_schema = "{\"path\":string,\"replace\"?:boolean}", .description_order = 109 },
.{ .id = .set_desktop_mode, .kind = .action, .description = "Set Canvas or Workspaces mode", .params_schema = "{\"mode\":\"canvas\" | \"workspaces\", \"persist\"?:boolean}", .description_order = 101 },
.{ .id = .set_workspace_layout, .kind = .action, .description = "Set a workspace to automatic tiling or floating", .params_schema = "{\"workspace\":number, \"automatic\":boolean}", .description_order = 102 },
.{ .id = .switch_workspace, .kind = .action, .description = "Activate a workspace", .params_schema = "{\"workspace\":number}", .description_order = 103 },
@@ -839,7 +843,7 @@ pub const capabilities = blk: {
pub const descriptions = blk: {
var result: [specs.len]protocol.CommandDesc = undefined;
for (specs) |s| result[s.description_order] = .{
- .name = @tagName(s.id),
+ .name = s.wire(),
.kind = @tagName(s.kind),
.description = s.description,
.params_schema = s.params_schema,
diff --git a/src/ipc/handlers.zig b/src/ipc/handlers.zig
index 093495d..36d1a6a 100644
--- a/src/ipc/handlers.zig
+++ b/src/ipc/handlers.zig
@@ -58,6 +58,15 @@ pub fn handleRequest(
.get_services => return @import("settings.zig").services(server, allocator),
.get_sounds => return .{ .ok = .{ .sounds = try @import("../audio/sounds.zig").inspect(server, allocator) } },
.get_wallpaper => return @import("settings.zig").wallpaper(server, allocator),
+ .theme_list => {
+ const packs = try @import("config").theme_pack.list(allocator, server.io, server.environ, server.config.path);
+ var result: protocol.ResponsePayload = .{ .theme_packs = .{ .active = server.config.theme_base, .packs = &.{} } };
+ const T = @typeInfo(@TypeOf(result.theme_packs.packs)).pointer.child;
+ const rows = try allocator.alloc(T, packs.len);
+ for (packs, rows) |p, *row| row.* = .{ .id = p.id, .name = p.name, .version = p.version, .user_installed = p.user_installed };
+ result.theme_packs.packs = rows;
+ return .{ .ok = result };
+ },
.get_theme => return @import("settings.zig").getTheme(server, allocator),
.get_processes => return @import("processes.zig").start(server, request_id, client),
.get_keyboard_layouts => return .{ .ok = .{ .keyboard_layouts = try @import("../input/layouts.zig").inspect(server, allocator) } },
@@ -678,6 +687,14 @@ fn handleAction(
return .{ .ok = .{ .service_mode = .{ .service = p.service, .mode = p.mode } } };
},
.play_sound => |p| return @import("../audio/sounds.zig").play(server, allocator, p.event) catch |err| .{ .err = @errorName(err) },
+ .theme_apply => |p| {
+ @import("../config_runtime/theme_pack.zig").apply(server, p.id) catch |err| return .{ .err = @errorName(err) };
+ return .{ .ok = .handled };
+ },
+ .theme_install => |p| {
+ @import("../config_runtime/theme_job.zig").start(server, if (p.replace) &.{ "install", p.path, "--replace" } else &.{ "install", p.path }, client, request_id) catch |err| return .{ .err = @errorName(err) };
+ return .{ .ok = .async_pending };
+ },
.set_wallpaper => |p| {
@import("settings.zig").setWallpaper(server, p.path, p.persist) catch |err| return .{ .err = @errorName(err) };
return .{ .ok = .handled };
diff --git a/src/ipc/protocol.zig b/src/ipc/protocol.zig
index c6993d6..e53d0cf 100644
--- a/src/ipc/protocol.zig
+++ b/src/ipc/protocol.zig
@@ -980,6 +980,8 @@ pub const ProcessesResult = struct {
};
pub const Action = union(enum) {
+ theme_apply: struct { id: []const u8 },
+ theme_install: struct { path: []const u8, replace: bool = false },
set_service_mode: struct { service: []const u8, mode: ServiceMode },
play_sound: struct { event: []const u8 },
set_wallpaper: struct { path: []const u8, persist: bool = true },
@@ -1080,6 +1082,7 @@ pub const Action = union(enum) {
};
pub const Request = union(enum) {
+ theme_list,
get_services,
get_sounds,
get_wallpaper,
@@ -1133,6 +1136,8 @@ pub const TextInputResult = struct {
pub const ResponsePayload = union(enum) {
services: ServicesResult,
+ theme_packs: struct { active: []const u8, packs: []const struct { id: []const u8, name: []const u8, version: []const u8, user_installed: bool } },
+ theme_job: struct { id: []const u8, message: []const u8 },
sounds: SoundsResult,
wallpaper: WallpaperResult,
theme: struct { tokens: ThemeTokens, path: ?[]const u8, dark_mode: bool },
@@ -1900,6 +1905,16 @@ fn persistParam(p: std.json.ObjectMap) ParseError!bool {
fn parseActionParams(allocator: std.mem.Allocator, command_tag: commands.RouteTag(.action), params: ?std.json.ObjectMap) ParseError!Action {
switch (command_tag) {
+ .theme_apply => {
+ const p = params orelse return error.InvalidRequest;
+ return .{ .theme_apply = .{ .id = try requiredText(allocator, p, "id", 64) } };
+ },
+ .theme_install => {
+ const p = params orelse return error.InvalidRequest;
+ const r = p.get("replace");
+ if (r != null and r.? != .bool) return error.InvalidRequest;
+ return .{ .theme_install = .{ .path = try requiredText(allocator, p, "path", 4095), .replace = if (r) |v| v.bool else false } };
+ },
.switch_layout => {
const p = params orelse return error.InvalidRequest;
const value = p.get("layout") orelse return error.InvalidRequest;
@@ -2705,6 +2720,16 @@ fn stringifyResponsePayload(payload: ResponsePayload, writer: anytype) !void {
try writer.print("{f}", .{std.json.fmt(value, .{})});
try writer.writeByte('}');
},
+ .theme_packs => |value| {
+ try writer.writeAll("{\"ThemePacks\":");
+ try writer.print("{f}", .{std.json.fmt(value, .{})});
+ try writer.writeByte('}');
+ },
+ .theme_job => |value| {
+ try writer.writeAll("{\"ThemeJob\":");
+ try writer.print("{f}", .{std.json.fmt(value, .{})});
+ try writer.writeByte('}');
+ },
.sounds => |value| {
try writer.writeAll("{\"Sounds\":");
try writer.print("{f}", .{std.json.fmt(value, .{})});
diff --git a/src/ipc/server.zig b/src/ipc/server.zig
index e12576c..55bb69a 100644
--- a/src/ipc/server.zig
+++ b/src/ipc/server.zig
@@ -238,6 +238,9 @@ pub const Client = struct {
}
pub fn destroy(client: *Client) void {
+ if (client.ipc.compositor.theme_job) |job| if (job.client == client) {
+ job.client = null;
+ };
if (client.process_job) |job| job.cancel();
client.process_job = null;
client.ipc.wait_mgr.cancelForClient(client.id);
diff --git a/src/ipc/settings.zig b/src/ipc/settings.zig
index df88a0f..726587f 100644
--- a/src/ipc/settings.zig
+++ b/src/ipc/settings.zig
@@ -38,7 +38,7 @@ pub fn services(server: *Server, a: std.mem.Allocator) !protocol.Response {
pub fn wallpaper(server: *Server, a: std.mem.Allocator) !protocol.Response {
return .{ .ok = .{ .wallpaper = .{
.configured = server.config.compositor.wallpaper,
- .resolved_path = wallpapers.resolve(a, server.io, server.config.compositor.wallpaper) catch null,
+ .resolved_path = @import("../config_runtime/theme_pack.zig").wallpaperPath(server, a) catch null,
.displayed_path = server.wallpaper_displayed_path,
.loading = server.wallpaper_loader != null,
.failed = server.wallpaper_failed,
diff --git a/src/ipc_serializers.jsonl b/src/ipc_serializers.jsonl
index 5c443f4..6740b49 100644
--- a/src/ipc_serializers.jsonl
+++ b/src/ipc_serializers.jsonl
@@ -1,5 +1,9 @@
{"Ok":{"Services":{"available":false,"loading":false,"analyzing":false,"timing_available":false,"action_pending":false,"boot_us":null,"status":"text \"quoted\"\n\\","supported_modes":["text \"quoted\"\n\\"],"services":[{"name":"text \"quoted\"\n\\","description":"text \"quoted\"\n\\","active":"text \"quoted\"\n\\","sub":"text \"quoted\"\n\\","startup":"text \"quoted\"\n\\","trigger":"text \"quoted\"\n\\","activation_us":null,"editable":false}]}}}
{"Ok":{"Services":{"available":true,"loading":true,"analyzing":true,"timing_available":true,"action_pending":true,"boot_us":7,"status":"text \"quoted\"\n\\","supported_modes":["text \"quoted\"\n\\"],"services":[{"name":"text \"quoted\"\n\\","description":"text \"quoted\"\n\\","active":"text \"quoted\"\n\\","sub":"text \"quoted\"\n\\","startup":"text \"quoted\"\n\\","trigger":"text \"quoted\"\n\\","activation_us":7,"editable":true}]}}}
+{"Ok":{"ThemePacks":{"active":"text \"quoted\"\n\\","packs":[{"id":"text \"quoted\"\n\\","name":"text \"quoted\"\n\\","version":"text \"quoted\"\n\\","user_installed":false}]}}}
+{"Ok":{"ThemePacks":{"active":"text \"quoted\"\n\\","packs":[{"id":"text \"quoted\"\n\\","name":"text \"quoted\"\n\\","version":"text \"quoted\"\n\\","user_installed":true}]}}}
+{"Ok":{"ThemeJob":{"id":"text \"quoted\"\n\\","message":"text \"quoted\"\n\\"}}}
+{"Ok":{"ThemeJob":{"id":"text \"quoted\"\n\\","message":"text \"quoted\"\n\\"}}}
{"Ok":{"Sounds":{"theme":"text \"quoted\"\n\\","enabled":false,"player_available":false,"events":[{"name":"text \"quoted\"\n\\","enabled":false,"available":false,"path":null}]}}}
{"Ok":{"Sounds":{"theme":"text \"quoted\"\n\\","enabled":true,"player_available":true,"events":[{"name":"text \"quoted\"\n\\","enabled":true,"available":true,"path":"text \"quoted\"\n\\"}]}}}
{"Ok":{"Wallpaper":{"configured":"text \"quoted\"\n\\","resolved_path":null,"displayed_path":null,"loading":false,"failed":false,"width":null,"height":null}}}
diff --git a/src/ipc_tests.zig b/src/ipc_tests.zig
index 32ef04d..2fc78e8 100644
--- a/src/ipc_tests.zig
+++ b/src/ipc_tests.zig
@@ -805,7 +805,7 @@ test "IPC registry covers public variants and all routes" {
cap_count += 1;
};
var desc_count: usize = 0;
- for (registry.descriptions) |desc| if (std.mem.eql(u8, desc.name, @tagName(s.id))) {
+ for (registry.descriptions) |desc| if (std.mem.eql(u8, desc.name, comptime s.wire())) {
desc_count += 1;
};
try std.testing.expectEqual(@as(usize, 1), cap_count);
@@ -885,7 +885,7 @@ test "every v1 command parses" {
var arena = std.heap.ArenaAllocator.init(std.testing.allocator);
defer arena.deinit();
const a = arena.allocator();
- const input = try std.fmt.allocPrint(a, "{{\"version\":1,\"command\":\"{s}\",\"params\":{s}}}", .{ comptime s.wire(), if (s.id == .set_desktop_mode) "{\"mode\":\"workspaces\"}" else params });
+ const input = try std.fmt.allocPrint(a, "{{\"version\":1,\"command\":\"{s}\",\"params\":{s}}}", .{ comptime s.wire(), if (s.id == .set_desktop_mode) "{\"mode\":\"workspaces\"}" else if (s.id == .theme_apply) "{\"id\":\"rediwm-dark\"}" else params });
const request = try protocol.parseRequest(a, input);
try std.testing.expectEqualStrings(@tagName(s.id), requestCommandName(request));
}
diff --git a/src/main.zig b/src/main.zig
index 8c7b9f8..eda7641 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -99,7 +99,9 @@ fn start(init: std.process.Init) !bool {
// Process-lifetime caches, emptied after the scene has dropped its buffers.
defer @import("ui").text.deinit();
defer @import("panel_buffer.zig").PanelBuffer.drainPool();
- defer @import("ui").shell_icons.deinit();
+ defer @import("ui").shell_icons.deinitPack();
+ defer @import("desktop/watcher.zig").deinitIcons();
+ defer @import("icon_cache.zig").deinit();
defer server.deinit();
var buf: [11]u8 = undefined;
diff --git a/src/projection.c b/src/projection.c
index b2482ae..a3043fc 100644
--- a/src/projection.c
+++ b/src/projection.c
@@ -87,6 +87,8 @@ struct leaf {
struct wlr_scene_surface *surface;
struct feedback *feedback;
bool dirty, seen;
+ // Under an inert tree at the last resolve(): drawn, never picked.
+ bool inert;
// Commits can outpace presentation. Keep their union, including empty damage
// on a rotated buffer; buffer identity is not evidence of changed pixels.
pixman_region32_t damage;
@@ -135,10 +137,12 @@ struct leaf {
// the source graph while belonging to no window shape. The subtree's own clip,
// if it sets one, still applies;
// * shadow: every leaf under the tree is the analytic shadow of this shape
-// (REDIWM_ITEM_SHADOW), resolved like the clip.
+// (REDIWM_ITEM_SHADOW), resolved like the clip;
+// * inert: the subtree is shown but takes no input: the pick passes through it
+// to what is below (a window sliding off a workspace it has left).
struct tree_props {
struct wlr_addon addon;
- bool has_zoom, has_scale, has_clip, unclipped, has_shadow;
+ bool has_zoom, has_scale, has_clip, unclipped, has_shadow, inert;
double zoom, scale;
struct rediwm_clip_spec clip;
struct rediwm_shadow_spec shadow;
@@ -223,6 +227,12 @@ bool rediwm_projection_set_tree_unclipped(struct wlr_scene_node *node, bool uncl
if (props) props->unclipped = unclipped;
return true;
}
+bool rediwm_projection_set_tree_inert(struct wlr_scene_node *node, bool inert) {
+ struct tree_props *props = inert ? tree_props_get(node) : tree_props_find(node);
+ if (inert && !props) return false;
+ if (props) props->inert = inert;
+ return true;
+}
static const struct wlr_addon_interface source_lookup_impl, group_source_impl;
struct watched_surface {
struct rediwm_projection *projection;
@@ -518,7 +528,7 @@ static void damage_clip_change(struct rediwm_projection *p, const struct rediwm_
// moves and shows nothing.
static void resolve_node(struct rediwm_projection *p, struct group *g,
struct wlr_scene_node *node, double x, double y,
- bool enabled, struct rediwm_xform t,
+ bool enabled, bool inert, struct rediwm_xform t,
const struct rediwm_clip *clip,
const struct rediwm_shadow *shadow) {
x += node->x;
@@ -533,6 +543,7 @@ static void resolve_node(struct rediwm_projection *p, struct group *g,
if (props->has_zoom) t = rediwm_xform_scale_about(t, props->zoom, x, y);
if (props->has_scale) t = rediwm_xform_scale_about(t, props->scale, x, y);
if (props->unclipped) clip = NULL;
+ if (props->inert) inert = true;
if (props->has_clip) {
here = rediwm_clip_resolve(t, x, y, &props->clip);
clip = &here;
@@ -552,7 +563,7 @@ static void resolve_node(struct rediwm_projection *p, struct group *g,
}
struct wlr_scene_node *child;
wl_list_for_each(child, &wlr_scene_tree_from_node(node)->children, link)
- resolve_node(p, g, child, x, y, enabled, t, clip, shadow);
+ resolve_node(p, g, child, x, y, enabled, inert, t, clip, shadow);
return;
}
struct leaf *l = get_leaf(p, node);
@@ -561,6 +572,7 @@ static void resolve_node(struct rediwm_projection *p, struct group *g,
return;
}
l->seen = true;
+ if (l->inert != inert) l->inert = inert;
// Flattened leaves within each group retain the source's paint order.
wl_list_insert(g->items.prev, &l->paint);
struct rediwm_item *item = &l->item;
@@ -1012,7 +1024,7 @@ static void resolve(struct rediwm_projection *p, double z, double cx, double cy,
g->seen = true;
g->enabled = node->enabled;
wl_list_insert(p->paint.prev, &g->paint);
- resolve_node(p, g, node, 0, 0, true, t, NULL, NULL);
+ resolve_node(p, g, node, 0, 0, true, false, t, NULL, NULL);
}
}
static void damage_restacked(struct rediwm_projection *p);
@@ -1222,7 +1234,7 @@ static struct wlr_scene_node *pick_world(struct rediwm_projection *p, double lx,
struct leaf *l = wl_container_of(ll, l, paint);
const struct rediwm_item *item = &l->item;
// An effect takes no input, and a leaf with no pixels once rounded is not shown.
- if (!item->enabled || item->kind == REDIWM_ITEM_EFFECT) continue;
+ if (!item->enabled || item->kind == REDIWM_ITEM_EFFECT || l->inert) continue;
const struct rediwm_snap s = rediwm_edges_snap(item->edges);
if (s.width <= 0 || s.height <= 0 || px < s.x || px >= s.x + s.width || py < s.y ||
py >= s.y + s.height)
diff --git a/src/projection.h b/src/projection.h
index 2749c70..dcd4f9f 100644
--- a/src/projection.h
+++ b/src/projection.h
@@ -64,6 +64,8 @@ bool rediwm_projection_set_tree_shadow(struct wlr_scene_node *, const struct red
// Ends the clip inherited from an ancestor for this subtree (an xdg popup lives
// under its parent's tree but is no part of the window's shape).
bool rediwm_projection_set_tree_unclipped(struct wlr_scene_node *, bool);
+// Shows the subtree but lets the pick pass through it to what is below.
+bool rediwm_projection_set_tree_inert(struct wlr_scene_node *, bool);
// Buffer-local damage for the next buffer set on a compositor-owned source
// buffer node; NULL damages all of it. Surface leaves track their own.
struct pixman_region32;
diff --git a/src/projection.zig b/src/projection.zig
index 32404d6..42cd52e 100644
--- a/src/projection.zig
+++ b/src/projection.zig
@@ -76,3 +76,7 @@ pub fn setTreeShadow(node: *wlr.SceneNode, spec: ?ShadowSpec) bool {
/// window's shadow hangs under the window's tree but is no part of its shape.
extern fn rediwm_projection_set_tree_unclipped(node: *wlr.SceneNode, unclipped: bool) bool;
pub const setTreeUnclipped = rediwm_projection_set_tree_unclipped;
+/// Shows the subtree but lets the pick pass through it to what is below: a
+/// window sliding off the workspace it has left.
+extern fn rediwm_projection_set_tree_inert(node: *wlr.SceneNode, inert: bool) bool;
+pub const setTreeInert = rediwm_projection_set_tree_inert;
diff --git a/src/projection_test.c b/src/projection_test.c
index 8203145..815b59d 100644
--- a/src/projection_test.c
+++ b/src/projection_test.c
@@ -561,6 +561,13 @@ static void test_clip_output(struct wlr_scene *scene, struct wlr_scene_output *o
assert(hit == under_leaf->source);
hit = rediwm_projection_node_at(p, 310.5, 200.5, &nx, &ny); // on the straight edge
assert(hit == client_leaf->source);
+ // An inert window is still drawn, but the pointer reaches what is below it.
+ assert(rediwm_projection_set_tree_inert(&frame->node, true));
+ rediwm_projection_sync(p, 1, 0, 0, 0, 0);
+ assert(client_leaf->item.enabled && rediwm_projection_node_at(p, 360, 240, &nx, &ny) == under_leaf->source);
+ assert(rediwm_projection_set_tree_inert(&frame->node, false));
+ rediwm_projection_sync(p, 1, 0, 0, 0, 0);
+ assert(rediwm_projection_node_at(p, 360, 240, &nx, &ny) == client_leaf->source);
// Without a shape the corner is the window's again.
assert(rediwm_projection_set_tree_clip(&frame->node, NULL));
rediwm_projection_sync(p, 1, 0, 0, 0, 0);
diff --git a/src/theme_helper/native.c b/src/theme_helper/native.c
new file mode 100644
index 0000000..b65fd19
--- /dev/null
+++ b/src/theme_helper/native.c
@@ -0,0 +1,381 @@
+#define _GNU_SOURCE
+#include <archive.h>
+#include <archive_entry.h>
+#include <cairo.h>
+#include <librsvg/rsvg.h>
+#include "thumb_codec.h"
+#include <webp/decode.h>
+#include <png.h>
+#include <dirent.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <linux/landlock.h>
+#include <linux/filter.h>
+#include <linux/seccomp.h>
+#include <linux/audit.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/prctl.h>
+#include <sys/stat.h>
+#include <sys/syscall.h>
+#include <sys/wait.h>
+#include <sys/resource.h>
+#include <X11/Xcursor/Xcursor.h>
+#include <time.h>
+#include <unistd.h>
+
+#define MAX_ENTRIES 4000
+#define MAX_FILE (40u * 1024u * 1024u)
+#define MAX_TOTAL (128u * 1024u * 1024u)
+static char problem[4096];
+static unsigned entries;
+static uint64_t total;
+extern int rediwm_theme_safe_path(const char *);
+const char *rediwm_theme_problem(void) { return problem; }
+static int fail(const char *file, const char *rule) {
+ snprintf(problem, sizeof(problem), "%s: %s", file, rule); return -1;
+}
+static int suffix(const char *p, const char *s) {
+ size_t n = strlen(p), m = strlen(s); return n >= m && !strcasecmp(p+n-m,s);
+}
+static int allowed(const char *p, int directory) {
+ if (!rediwm_theme_safe_path(p)) return 0;
+ if (!strcmp(p,"theme.toml") || !strcmp(p,"preview.png") || !strcmp(p,"logo.svg") || !strcmp(p,"logo.png")) return !directory;
+ if (!strncmp(p,"README",6) || !strncmp(p,"LICENSE",7)) return !strchr(p,'/');
+ const char *slash = strchr(p,'/');
+ if (!slash) return directory && (!strcmp(p,"wallpapers") || !strcmp(p,"glyphs") || !strcmp(p,"icons") || !strcmp(p,"cursors"));
+ if (!strncmp(p,"cursors/",8)) {
+ if (!strcmp(p,"cursors/index.theme")) return !directory;
+ if (!strcmp(p,"cursors/cursors")) return directory;
+ return !directory && !strncmp(p,"cursors/cursors/",16) && !strchr(p+16,'/');
+ }
+ if (directory || strchr(slash+1,'/')) return 0;
+ if (!strncmp(p,"wallpapers/",11)) return suffix(p,".png") || suffix(p,".jpg") || suffix(p,".jpeg") || suffix(p,".webp");
+ if (!strncmp(p,"glyphs/",7)) return suffix(p,".svg");
+ if (!strncmp(p,"icons/",6)) return suffix(p,".svg") || suffix(p,".png");
+ return 0;
+}
+static int alias(const char *path, const char *target) {
+ return !strncmp(path,"cursors/cursors/",16) && !strchr(path+16,'/') && target && *target && !strchr(target,'/') && rediwm_theme_safe_path(target);
+}
+static int parent_dirs(const char *path) {
+ char copy[4096]; if (strlen(path)>=sizeof(copy)) return -1;
+ strcpy(copy,path);
+ for(char *p=copy+1;*p;p++) if(*p=='/') {
+ *p=0; if(mkdir(copy,0700)<0 && errno!=EEXIST) return -1;
+ struct stat st; if(lstat(copy,&st)<0 || !S_ISDIR(st.st_mode)) return -1;
+ *p='/';
+ }
+ return 0;
+}
+static int copy_file(const char *src, const char *dst) {
+ if(parent_dirs(dst)<0) return fail(dst,"cannot create parent");
+ int in=open(src,O_RDONLY|O_NOFOLLOW|O_CLOEXEC),out=-1;
+ if(in<0) return fail(src,"cannot open regular file");
+ struct stat st; if(fstat(in,&st)<0 || !S_ISREG(st.st_mode)) {close(in);return fail(src,"regular files only");}
+ out=open(dst,O_WRONLY|O_CREAT|O_EXCL|O_NOFOLLOW|O_CLOEXEC,0600);
+ if(out<0) {close(in);return fail(dst,"cannot create file");}
+ char buf[65536]; uint64_t bytes=0; ssize_t n; int rc=0;
+ while((n=read(in,buf,sizeof(buf)))>0) {
+ bytes+=(uint64_t)n;total+=(uint64_t)n;
+ if(bytes>MAX_FILE || total>MAX_TOTAL) {rc=fail(src,"unpacked byte limit exceeded");break;}
+ ssize_t off=0;while(off<n) {ssize_t w=write(out,buf+off,n-off);if(w<=0){rc=fail(dst,"write failed");break;}off+=w;}
+ if(rc) break;
+ }
+ if(n<0) rc=fail(src,"read failed");
+ close(in);if(fsync(out)<0) rc=fail(dst,"fsync failed");close(out);return rc;
+}
+static int walk_copy(const char *root,const char *rel,const char *dest) {
+ char path[4096];if(snprintf(path,sizeof(path),"%s%s%s",root,*rel?"/":"",rel)>=(int)sizeof(path))return fail(rel,"path too long");
+ DIR *dir=opendir(path);if(!dir)return fail(path,"cannot open directory");
+ struct dirent *e;int rc=0;
+ while((e=readdir(dir))) {
+ if(!strcmp(e->d_name,".")||!strcmp(e->d_name,".."))continue;
+ char child[4096],src[4096],dst[4096];
+ if(snprintf(child,sizeof(child),"%s%s%s",rel,*rel?"/":"",e->d_name)>=(int)sizeof(child) ||
+ snprintf(src,sizeof(src),"%s/%s",root,child)>=(int)sizeof(src) ||
+ snprintf(dst,sizeof(dst),"%s/%s",dest,child)>=(int)sizeof(dst)) {rc=fail(rel,"path too long");break;}
+ struct stat st;
+ if(++entries>MAX_ENTRIES){rc=fail(child,"entry limit exceeded");break;}
+ if(lstat(src,&st)<0){rc=fail(child,"stat failed");break;}
+ if(S_ISLNK(st.st_mode)) {
+ char target[4096];ssize_t n=readlink(src,target,sizeof(target)-1);if(n<0){rc=fail(child,"readlink failed");break;}target[n]=0;
+ if(!alias(child,target)){rc=fail(child,"symlink not a cursor alias");break;}
+ if(parent_dirs(dst)<0 || symlink(target,dst)<0){rc=fail(child,"alias create failed");break;}
+ } else if(S_ISDIR(st.st_mode)) {
+ if(!allowed(child,1)){rc=fail(child,"directory not allowed");break;}
+ if(mkdir(dst,0700)<0){rc=fail(child,"mkdir failed");break;}
+ rc=walk_copy(root,child,dest);if(rc)break;
+ } else if(S_ISREG(st.st_mode)) {
+ if(!allowed(child,0)){rc=fail(child,"file not allowed");break;}
+ rc=copy_file(src,dst);if(rc)break;
+ } else {rc=fail(child,"special files forbidden");break;}
+ }
+ closedir(dir);return rc;
+}
+int rediwm_theme_stage(const char *source,const char *dest) {
+ entries=0;total=0;problem[0]=0;
+ struct stat st;if(lstat(source,&st)<0)return fail(source,"source missing");
+ if(S_ISDIR(st.st_mode))return walk_copy(source,"",dest);
+ if(!S_ISREG(st.st_mode))return fail(source,"regular ZIP or directory required");
+ struct archive *a=archive_read_new();if(!a)return fail(source,"allocation failed");
+ archive_read_support_format_zip(a);archive_read_support_filter_none(a);
+ int rc=0,status;struct archive_entry *e;
+ if(archive_read_open_filename(a,source,65536)!=ARCHIVE_OK){rc=fail(source,"ZIP required");goto done;}
+ while((status=archive_read_next_header(a,&e))==ARCHIVE_OK) {
+ const char *raw=archive_entry_pathname(e);char name[4096];
+ if(!raw || !rediwm_theme_safe_path(raw) || strlen(raw)>=sizeof(name)){rc=fail(raw?raw:source,"unsafe archive path");break;}
+ strcpy(name,raw);size_t n=strlen(name);while(n && name[n-1]=='/')name[--n]=0;
+ if(!n)continue;
+ if(++entries>MAX_ENTRIES){rc=fail(name,"entry limit exceeded");break;}
+ mode_t type=archive_entry_filetype(e);
+ if(archive_entry_hardlink(e) || archive_entry_is_encrypted(e)){rc=fail(name,"hardlinks and encryption forbidden");break;}
+ // Names are checked after unwrapping the optional top-level directory.
+ char path[4096];if(snprintf(path,sizeof(path),"%s/%s",dest,name)>=(int)sizeof(path)){rc=fail(name,"path too long");break;}
+ if(parent_dirs(path)<0){rc=fail(name,"unsafe parent");break;}
+ if(type==AE_IFDIR){if(mkdir(path,0700)<0 && errno!=EEXIST){rc=fail(name,"mkdir failed");break;}continue;}
+ if(type==AE_IFLNK) {
+ const char *t=archive_entry_symlink(e);const char *p=name;
+ if(strncmp(p,"cursors/",8)) {const char *slash=strchr(p,'/');if(slash)p=slash+1;}
+ if(!alias(p,t)||symlink(t,path)<0){rc=fail(name,"symlink not a cursor alias");break;}continue;
+ }
+ if(type!=AE_IFREG){rc=fail(name,"special files forbidden");break;}
+ int fd=open(path,O_WRONLY|O_CREAT|O_EXCL|O_NOFOLLOW|O_CLOEXEC,0600);
+ if(fd<0){rc=fail(name,"duplicate or unsafe file");break;}
+ uint64_t bytes=0;char buf[65536];ssize_t got;
+ while((got=archive_read_data(a,buf,sizeof(buf)))>0) {
+ bytes+=(uint64_t)got;total+=(uint64_t)got;
+ if(bytes>MAX_FILE || total>MAX_TOTAL){rc=fail(name,"unpacked byte limit exceeded");break;}
+ ssize_t off=0;while(off<got){ssize_t w=write(fd,buf+off,got-off);if(w<=0){rc=fail(name,"write failed");break;}off+=w;}if(rc)break;
+ }
+ if(got<0)rc=fail(name,"invalid ZIP data");
+ if(fsync(fd)<0)rc=fail(name,"fsync failed");close(fd);if(rc)break;
+ }
+ if(!rc && status!=ARCHIVE_EOF)rc=fail(source,"invalid ZIP");
+ done:archive_read_free(a);return rc;
+}
+// Validate Adam7 PNGs row by row across their passes; no full-size raster.
+static int png_stream_validate(const char *file,int *width,int *height) {
+ FILE *input=fopen(file,"rb");if(!input)return 0;
+ png_structp png=png_create_read_struct(PNG_LIBPNG_VER_STRING,NULL,NULL,NULL);
+ png_infop info=png?png_create_info_struct(png):NULL;
+ if(!info){if(png)png_destroy_read_struct(&png,NULL,NULL);fclose(input);return 0;}
+ void *volatile row=NULL;
+ if(setjmp(png_jmpbuf(png))) {free((void*)row);png_destroy_read_struct(&png,&info,NULL);fclose(input);return 0;}
+ png_set_user_limits(png,16384,16384);png_init_io(png,input);png_read_info(png,info);
+ *width=(int)png_get_image_width(png,info);*height=(int)png_get_image_height(png,info);
+ int passes=png_set_interlace_handling(png);png_read_update_info(png,info);
+ row=calloc(1,png_get_rowbytes(png,info));if(!row)png_error(png,"row allocation failed");
+ for(int pass=0;pass<passes;pass++)for(int y=0;y<*height;y++)png_read_row(png,(png_bytep)row,NULL);
+ png_read_end(png,NULL);free((void*)row);png_destroy_read_struct(&png,&info,NULL);fclose(input);return 1;
+}
+static int validate_file(const char *file,const char *rel,off_t bytes) {
+ if(!strncmp(rel,"cursors/cursors/",16)) {
+ XcursorImages *images=XcursorFilenameLoadImages(file,256);
+ if(!images)return fail(rel,"invalid Xcursor file");
+ int valid=images->nimage>0&&images->nimage<=256;
+ for(int i=0;i<images->nimage&&valid;i++) {
+ XcursorImage *image=images->images[i];
+ valid=image&&image->width>0&&image->height>0&&image->width<=512&&image->height<=512&&image->xhot<image->width&&image->yhot<image->height;
+ }
+ XcursorImagesDestroy(images);
+ return valid?0:fail(rel,"invalid or oversized cursor images");
+ }
+ if(suffix(rel,".svg")) {
+ size_t limit=!strncmp(rel,"glyphs/",7)?65536:512*1024;
+ if(bytes<0||(uint64_t)bytes>limit)return fail(rel,"SVG byte limit exceeded");
+ gchar *data=NULL;gsize size=0;GError *error=NULL;
+ if(!g_file_get_contents(file,&data,&size,&error)){if(error)g_error_free(error);return fail(rel,"SVG read failed");}
+ // No base URI: SVG references cannot read external resources.
+ RsvgHandle *handle=rsvg_handle_new_from_data((guint8*)data,size,&error);g_free(data);
+ if(!handle){if(error)g_error_free(error);return fail(rel,"invalid SVG");}
+ cairo_surface_t *surface=cairo_image_surface_create(CAIRO_FORMAT_ARGB32,256,256);cairo_t *cr=cairo_create(surface);
+ RsvgRectangle viewport={0,0,256,256};struct timespec before,after;
+ clock_gettime(CLOCK_MONOTONIC,&before);gboolean ok=rsvg_handle_render_document(handle,cr,&viewport,&error);clock_gettime(CLOCK_MONOTONIC,&after);
+ int64_t ns=(after.tv_sec-before.tv_sec)*1000000000ll+after.tv_nsec-before.tv_nsec;
+ cairo_destroy(cr);cairo_surface_destroy(surface);g_object_unref(handle);if(error)g_error_free(error);
+ if(!ok)return fail(rel,"SVG render failed");
+ if(!strncmp(rel,"glyphs/",7)&&ns>10000000)return fail(rel,"glyph render exceeded 10 ms");
+ } else if(suffix(rel,".png")||suffix(rel,".jpg")||suffix(rel,".jpeg")||suffix(rel,".webp")) {
+ gchar *data=NULL;gsize size=0;GError *error=NULL;
+ if(!g_file_get_contents(file,&data,&size,&error)){if(error)g_error_free(error);return fail(rel,"image read failed");}
+ int w=0,h=0,ok=0;
+ if(suffix(rel,".webp")) {
+ WebPDecoderConfig cfg;
+ if(WebPInitDecoderConfig(&cfg) && WebPGetFeatures((uint8_t*)data,size,&cfg.input)==VP8_STATUS_OK) {
+ w=cfg.input.width;h=cfg.input.height;
+ if(w>0&&h>0&&w<=16384&&h<=16384) {
+ cfg.options.use_scaling=1;cfg.options.scaled_width=w>256?256:w;cfg.options.scaled_height=h>256?256:h;
+ ok=WebPDecode((uint8_t*)data,size,&cfg)==VP8_STATUS_OK;WebPFreeDecBuffer(&cfg.output);
+ }
+ }
+ } else {
+ tc_image image={0};int rc=suffix(rel,".png")?tc_png((uint8_t*)data,size,256,16384ll*16384,&image):tc_jpeg((uint8_t*)data,size,256,16384ll*16384,&image);
+ ok=rc==TC_OK;w=image.src_w;h=image.src_h;tc_free(&image);
+ if(rc==TC_UNSUPPORTED && suffix(rel,".png"))ok=png_stream_validate(file,&w,&h);
+ }
+ g_free(data);
+ if(!ok||w<=0||h<=0||w>16384||h>16384)return fail(rel,"image decode failed or dimensions exceed 16384");
+ if(!strcmp(rel,"preview.png")&&(w>512||h>320))return fail(rel,"preview exceeds 512x320");
+ }
+ return 0;
+}
+static int validate_tree(const char *root,const char *rel) {
+ char path[4096];if(snprintf(path,sizeof(path),"%s%s%s",root,*rel?"/":"",rel)>=(int)sizeof(path))return fail(rel,"path too long");
+ DIR *dir=opendir(path);if(!dir)return fail(path,"directory unreadable");
+ int rc=0;struct dirent *e;
+ while((e=readdir(dir))) {
+ if(!strcmp(e->d_name,".")||!strcmp(e->d_name,".."))continue;
+ char child[4096],full[4096];
+ if(snprintf(child,sizeof(child),"%s%s%s",rel,*rel?"/":"",e->d_name)>=(int)sizeof(child)||snprintf(full,sizeof(full),"%s/%s",root,child)>=(int)sizeof(full)){rc=fail(rel,"path too long");break;}
+ struct stat st;if(lstat(full,&st)<0){rc=fail(child,"stat failed");break;}
+ if(++entries>MAX_ENTRIES){rc=fail(child,"entry limit exceeded");break;}
+ if(S_ISLNK(st.st_mode)) {
+ char target[4096];ssize_t n=readlink(full,target,sizeof(target)-1);if(n<0){rc=fail(child,"readlink failed");break;}target[n]=0;
+ if(!alias(child,target)){rc=fail(child,"symlink not a cursor alias");break;}
+ char resolved[4096];if(snprintf(resolved,sizeof(resolved),"%s/cursors/cursors/%s",root,target)>=(int)sizeof(resolved) || lstat(resolved,&st)<0 || !S_ISREG(st.st_mode)){rc=fail(child,"alias target must be a cursor file");break;}
+ } else if(!allowed(child,S_ISDIR(st.st_mode))){rc=fail(child,"file or directory not allowed");break;}
+ else if(S_ISDIR(st.st_mode)){rc=validate_tree(root,child);if(rc)break;}
+ else if(S_ISREG(st.st_mode)) {
+ if(st.st_size<0 || (uint64_t)st.st_size>MAX_FILE || (total+=(uint64_t)st.st_size)>MAX_TOTAL){rc=fail(child,"byte limit exceeded");break;}
+ if(!strncmp(child,"icons/",6)&&st.st_size>512*1024){rc=fail(child,"icon exceeds 512 KiB");break;}
+ rc=validate_file(full,child,st.st_size);if(rc)break;
+ } else {rc=fail(child,"special files forbidden");break;}
+ }
+ closedir(dir);return rc;
+}
+int rediwm_theme_validate(const char *root) {entries=0;total=0;return validate_tree(root,"");}
+int rediwm_theme_publish(const char *staging,const char *destination) {
+ struct stat st;
+ if(lstat(destination,&st)==0) {
+ if(!S_ISDIR(st.st_mode))return fail(destination,"existing destination is not a directory");
+ if(syscall(SYS_renameat2,AT_FDCWD,staging,AT_FDCWD,destination,2)<0)return fail(destination,"atomic replacement failed");
+ } else if(errno!=ENOENT || rename(staging,destination)<0)return fail(destination,"atomic install failed");
+ return 0;
+}
+static int pack_tree(struct archive *a,const char *root,const char *rel) {
+ char full[4096];if(snprintf(full,sizeof(full),"%s/%s",root,rel)>=(int)sizeof(full))return fail(rel,"path too long");
+ DIR *dir=opendir(full);if(!dir)return fail(rel,"cannot open directory");
+ int rc=0;struct dirent *e;
+ while((e=readdir(dir))) {
+ if(!strcmp(e->d_name,".")||!strcmp(e->d_name,".."))continue;
+ char child[4096],file[4096];
+ if(snprintf(child,sizeof(child),"%s%s%s",rel,*rel?"/":"",e->d_name)>=(int)sizeof(child)||snprintf(file,sizeof(file),"%s/%s",root,child)>=(int)sizeof(file)){rc=fail(rel,"path too long");break;}
+ struct stat st;if(lstat(file,&st)<0){rc=fail(child,"stat failed");break;}
+ struct archive_entry *entry=archive_entry_new();archive_entry_set_pathname(entry,child);archive_entry_set_perm(entry, S_ISDIR(st.st_mode)?0700:0600);
+ if(S_ISLNK(st.st_mode)){char target[4096];ssize_t n=readlink(file,target,sizeof(target)-1);if(n<0){archive_entry_free(entry);rc=fail(child,"readlink failed");break;}target[n]=0;archive_entry_set_filetype(entry,AE_IFLNK);archive_entry_set_symlink(entry,target);}
+ else {archive_entry_set_filetype(entry,S_ISDIR(st.st_mode)?AE_IFDIR:AE_IFREG);archive_entry_set_size(entry,S_ISDIR(st.st_mode)?0:st.st_size);}
+ if(archive_write_header(a,entry)!=ARCHIVE_OK)rc=fail(child,"ZIP header write failed");
+ archive_entry_free(entry);
+ if(!rc && S_ISREG(st.st_mode)) {
+ int fd=open(file,O_RDONLY|O_NOFOLLOW|O_CLOEXEC);if(fd<0){rc=fail(child,"read failed");break;}
+ char buf[65536];ssize_t n;while((n=read(fd,buf,sizeof(buf)))>0)if(archive_write_data(a,buf,n)!=n){rc=fail(child,"ZIP write failed");break;}
+ close(fd);if(n<0)rc=fail(child,"read failed");
+ } else if(!rc && S_ISDIR(st.st_mode))rc=pack_tree(a,root,child);
+ if(rc)break;
+ }
+ closedir(dir);return rc;
+}
+int rediwm_theme_pack(const char *root,const char *output) {
+ int fd=open(output,O_WRONLY|O_CREAT|O_EXCL|O_NOFOLLOW|O_CLOEXEC,0600);if(fd<0)return fail(output,"output already exists or cannot be created");
+ struct archive *a=archive_write_new();archive_write_set_format_zip(a);int rc=0;
+ if(archive_write_open_fd(a,fd)!=ARCHIVE_OK)rc=fail(output,"cannot write ZIP");else rc=pack_tree(a,root,"");
+ if(archive_write_close(a)!=ARCHIVE_OK&&!rc)rc=fail(output,"ZIP close failed");archive_write_free(a);if(fsync(fd)<0&&!rc)rc=fail(output,"fsync failed");close(fd);if(rc)unlink(output);return rc;
+}
+int rediwm_theme_copy(const char *src,const char *dst) {total=0;return copy_file(src,dst);}
+
+// Image and SVG parsers run in a disposable child with no writable filesystem
+// or networking. The parent performs publication only after this child exits.
+static int parser_sandbox(const char *root, const char *source, int writable) {
+ struct rlimit memory={512u*1024u*1024u,512u*1024u*1024u};
+ if(setrlimit(RLIMIT_AS,&memory)<0)return -1;
+ if(prctl(PR_SET_NO_NEW_PRIVS,1,0,0,0)<0)return -1;
+#ifdef SYS_landlock_create_ruleset
+ int abi=syscall(SYS_landlock_create_ruleset,NULL,0,LANDLOCK_CREATE_RULESET_VERSION);
+ if(abi>0) {
+ uint64_t access=LANDLOCK_ACCESS_FS_EXECUTE|LANDLOCK_ACCESS_FS_WRITE_FILE|LANDLOCK_ACCESS_FS_READ_FILE|LANDLOCK_ACCESS_FS_READ_DIR|LANDLOCK_ACCESS_FS_REMOVE_DIR|LANDLOCK_ACCESS_FS_REMOVE_FILE|LANDLOCK_ACCESS_FS_MAKE_CHAR|LANDLOCK_ACCESS_FS_MAKE_DIR|LANDLOCK_ACCESS_FS_MAKE_REG|LANDLOCK_ACCESS_FS_MAKE_SOCK|LANDLOCK_ACCESS_FS_MAKE_FIFO|LANDLOCK_ACCESS_FS_MAKE_BLOCK|LANDLOCK_ACCESS_FS_MAKE_SYM;
+ if(abi>=2)access|=LANDLOCK_ACCESS_FS_REFER;
+ if(abi>=3)access|=LANDLOCK_ACCESS_FS_TRUNCATE;
+ struct landlock_ruleset_attr attr={.handled_access_fs=access};
+ int rules=syscall(SYS_landlock_create_ruleset,&attr,sizeof(attr),0);
+ if(rules<0)return -1;
+ const char *paths[]={root,"/usr","/etc","/proc","/dev",source};
+ for(size_t i=0;i<sizeof(paths)/sizeof(paths[0]);i++) {
+ if(!paths[i])continue;
+ int fd=open(paths[i],O_PATH|O_CLOEXEC);if(fd<0)continue;
+ struct landlock_path_beneath_attr rule={.allowed_access=LANDLOCK_ACCESS_FS_READ_FILE|LANDLOCK_ACCESS_FS_READ_DIR,.parent_fd=fd};
+ if(i==0 && writable)rule.allowed_access=access & ~LANDLOCK_ACCESS_FS_EXECUTE;
+ struct stat st;if(fstat(fd,&st)==0 && !S_ISDIR(st.st_mode))rule.allowed_access=LANDLOCK_ACCESS_FS_READ_FILE;
+ if(i==1)rule.allowed_access|=LANDLOCK_ACCESS_FS_EXECUTE;
+ int rc=syscall(SYS_landlock_add_rule,rules,LANDLOCK_RULE_PATH_BENEATH,&rule,0);close(fd);
+ if(rc<0){close(rules);return -1;}
+ }
+ int rc=syscall(SYS_landlock_restrict_self,rules,0);close(rules);if(rc<0)return -1;
+ }
+#endif
+#if defined(__x86_64__)
+ const uint32_t expected_arch=AUDIT_ARCH_X86_64;
+#elif defined(__aarch64__)
+ const uint32_t expected_arch=AUDIT_ARCH_AARCH64;
+#else
+ return -1;
+#endif
+ struct sock_filter filter[]={
+ BPF_STMT(BPF_LD|BPF_W|BPF_ABS,offsetof(struct seccomp_data,arch)),
+ BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K,expected_arch,1,0),
+ BPF_STMT(BPF_RET|BPF_K,SECCOMP_RET_KILL_PROCESS),
+ BPF_STMT(BPF_LD|BPF_W|BPF_ABS,offsetof(struct seccomp_data,nr)),
+ BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K,0x40000000,0,1),
+ BPF_STMT(BPF_RET|BPF_K,SECCOMP_RET_KILL_PROCESS),
+ BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K,SYS_socket,0,1),
+ BPF_STMT(BPF_RET|BPF_K,SECCOMP_RET_ERRNO|EPERM),
+ BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K,SYS_connect,0,1),
+ BPF_STMT(BPF_RET|BPF_K,SECCOMP_RET_ERRNO|EPERM),
+ BPF_STMT(BPF_RET|BPF_K,SECCOMP_RET_ALLOW)
+ };
+ struct sock_fprog prog={.len=sizeof(filter)/sizeof(filter[0]),.filter=filter};
+ return prctl(PR_SET_SECCOMP,SECCOMP_MODE_FILTER,&prog);
+}
+int rediwm_theme_validate_isolated(const char *root) {
+ struct stat st;if(lstat(root,&st)<0||!S_ISDIR(st.st_mode))return fail(root,"pack root must be a directory");
+ int pipefd[2];if(pipe2(pipefd,O_CLOEXEC)<0)return fail(root,"validation pipe failed");
+ pid_t pid=fork();if(pid<0){close(pipefd[0]);close(pipefd[1]);return fail(root,"validation fork failed");}
+ if(pid==0) {
+ close(pipefd[0]);alarm(5);
+ if(parser_sandbox(root,NULL,0)<0) {fail(root,"parser sandbox failed");{ssize_t sent=write(pipefd[1],problem,strlen(problem));(void)sent;}_exit(1);}
+ int rc=rediwm_theme_validate(root);
+ if(rc){ssize_t sent=write(pipefd[1],problem,strlen(problem));(void)sent;}
+ _exit(rc?1:0);
+ }
+ close(pipefd[1]);ssize_t n=read(pipefd[0],problem,sizeof(problem)-1);close(pipefd[0]);if(n>0)problem[n]=0;
+ int status;while(waitpid(pid,&status,0)<0)if(errno!=EINTR)return fail(root,"validation wait failed");
+ if(!WIFEXITED(status)||WEXITSTATUS(status)!=0) {if(n>0)return -1;return fail(root,"parser failed or exceeded time limit");}
+ return 0;
+}
+
+int rediwm_theme_stage_isolated(const char *source,const char *dest) {
+ int pipefd[2];if(pipe2(pipefd,O_CLOEXEC)<0)return fail(source,"extraction pipe failed");
+ pid_t pid=fork();if(pid<0){close(pipefd[0]);close(pipefd[1]);return fail(source,"extraction fork failed");}
+ if(pid==0) {
+ close(pipefd[0]);alarm(20);
+ if(parser_sandbox(dest,source,1)<0) {fail(source,"archive sandbox failed");{ssize_t sent=write(pipefd[1],problem,strlen(problem));(void)sent;}_exit(1);}
+ int rc=rediwm_theme_stage(source,dest);
+ if(rc){ssize_t sent=write(pipefd[1],problem,strlen(problem));(void)sent;}
+ _exit(rc?1:0);
+ }
+ close(pipefd[1]);ssize_t n=read(pipefd[0],problem,sizeof(problem)-1);close(pipefd[0]);if(n>0)problem[n]=0;
+ int status;while(waitpid(pid,&status,0)<0)if(errno!=EINTR)return fail(source,"extraction wait failed");
+ if(!WIFEXITED(status)||WEXITSTATUS(status)!=0) {if(n>0)return -1;return fail(source,"archive parser failed or exceeded time limit");}
+ return 0;
+}
+
+int rediwm_theme_rollback(const char *staging,const char *destination) {
+ struct stat st;
+ if(lstat(staging,&st)==0) {
+ if(syscall(SYS_renameat2,AT_FDCWD,staging,AT_FDCWD,destination,2)<0)return fail(destination,"install rollback failed");
+ } else if(errno!=ENOENT || rename(destination,staging)<0)return fail(destination,"install rollback failed");
+ return 0;
+}
diff --git a/src/theme_main.zig b/src/theme_main.zig
new file mode 100644
index 0000000..47c3e17
--- /dev/null
+++ b/src/theme_main.zig
@@ -0,0 +1,198 @@
+//! Unprivileged theme archive helper; the compositor never links libarchive.
+const std = @import("std");
+const packs = @import("config").theme_pack;
+const theme = @import("ui").theme;
+const archive = @import("files/archive.zig");
+extern fn rediwm_theme_stage_isolated([*:0]const u8, [*:0]const u8) c_int;
+extern fn rediwm_theme_validate_isolated([*:0]const u8) c_int;
+extern fn rediwm_theme_rollback([*:0]const u8, [*:0]const u8) c_int;
+extern fn rediwm_theme_publish([*:0]const u8, [*:0]const u8) c_int;
+extern fn rediwm_theme_pack([*:0]const u8, [*:0]const u8) c_int;
+extern fn rediwm_theme_copy([*:0]const u8, [*:0]const u8) c_int;
+extern fn rediwm_theme_problem() [*:0]const u8;
+extern fn mkdtemp([*:0]u8) ?[*:0]u8;
+const a = std.heap.c_allocator;
+
+export fn rediwm_theme_safe_path(path: [*:0]const u8) c_int {
+ const raw = std.mem.span(path);
+ if (raw.len == 0 or raw[0] == '/' or std.mem.indexOfAny(u8, raw, "\"\n\r\t") != null) return 0;
+ const normalized = archive.normalize(a, raw) catch return 0;
+ defer a.free(normalized);
+ return @intFromBool(normalized.len > 0);
+}
+
+fn native(rc: c_int) !void {
+ if (rc == 0) return;
+ std.debug.print("{s}\n", .{rediwm_theme_problem()});
+ return error.PackValidationFailed;
+}
+fn z(path: []const u8) ![:0]u8 {
+ return a.dupeZ(u8, path);
+}
+fn validate(io: std.Io, root: []const u8, id: []const u8) !packs.Pack {
+ const path = try std.fs.path.join(a, &.{ root, "theme.toml" });
+ const bytes = try std.Io.Dir.cwd().readFileAlloc(io, path, a, .limited(1 << 20));
+ const p = packs.parse(a, bytes, id, root) catch |err| {
+ std.debug.print("{s}: {s}\n", .{ path, @errorName(err) });
+ return err;
+ };
+ try native(rediwm_theme_validate_isolated((try z(root)).ptr));
+ if (p.tokens.start_button_icon.len > 0) _ = try packs.asset(a, io, root, p.tokens.start_button_icon[root.len + 1 ..]);
+ if (p.wallpaper.len > 0) _ = try packs.asset(a, io, root, try std.fs.path.join(a, &.{ "wallpapers", p.wallpaper }));
+ if (std.mem.eql(u8, p.cursor_theme, "pack")) _ = try packs.asset(a, io, root, "cursors/index.theme");
+ return p;
+}
+fn unwrap(io: std.Io, stage: []const u8) ![]const u8 {
+ const manifest = try std.fs.path.join(a, &.{ stage, "theme.toml" });
+ if (std.Io.Dir.cwd().access(io, manifest, .{})) |_| return stage else |_| {}
+ var dir = try std.Io.Dir.cwd().openDir(io, stage, .{ .iterate = true });
+ defer dir.close(io);
+ var it = dir.iterate();
+ const entry = (try it.next(io)) orelse return error.MissingManifest;
+ if (entry.kind != .directory) return error.MissingManifest;
+ const root = try std.fs.path.join(a, &.{ stage, entry.name });
+ if ((try it.next(io)) != null) return error.MultipleArchiveRoots;
+ return root;
+}
+fn cursorLink(io: std.Io, env: std.process.Environ, p: packs.Pack, destination: []const u8, prepare: bool) !void {
+ const data = if (env.getPosix("XDG_DATA_HOME")) |d| d else try std.fs.path.join(a, &.{ env.getPosix("HOME") orelse return error.NoHome, ".local/share" });
+ const icons = try std.fs.path.join(a, &.{ data, "icons" });
+ const link = try std.fmt.allocPrint(a, "{s}/rediwm-{s}-cursors", .{ icons, p.id });
+ const stat = std.Io.Dir.cwd().statFile(io, link, .{ .follow_symlinks = false }) catch |err| switch (err) {
+ error.FileNotFound => null,
+ else => return err,
+ };
+ if (stat) |s| if (s.kind != .sym_link) return error.CursorLinkCollision;
+ if (!std.mem.eql(u8, p.cursor_theme, "pack")) {
+ if (!prepare and stat != null) try std.Io.Dir.cwd().deleteFile(io, link);
+ return;
+ }
+ try std.Io.Dir.cwd().createDirPath(io, icons);
+ if (prepare) return;
+ const temp = try std.fmt.allocPrintSentinel(a, "{s}/.rediwm-cursor-XXXXXX", .{icons}, 0);
+ if (mkdtemp(temp.ptr) == null) return error.CursorLinkFailed;
+ defer std.Io.Dir.cwd().deleteTree(io, temp) catch {};
+ const child = try std.fs.path.join(a, &.{ temp, "cursor" });
+ try std.Io.Dir.cwd().symLink(io, try std.fs.path.join(a, &.{ destination, "cursors" }), child, .{});
+ try std.Io.Dir.rename(.cwd(), child, .cwd(), link, io);
+}
+fn run(init: std.process.Init) !void {
+ if (std.posix.system.geteuid() == 0) return error.RunAsDesktopUser;
+ const io = init.io;
+ const args = init.minimal.args.vector;
+ if (args.len < 3) return error.Usage;
+ const verb = std.mem.span(args[1]);
+ const input = std.mem.span(args[2]);
+ if (std.mem.eql(u8, verb, "validate")) {
+ const p = try validate(io, input, std.fs.path.basename(input));
+ _ = std.posix.system.write(1, p.id.ptr, p.id.len);
+ _ = std.posix.system.write(1, "\n", 1);
+ return;
+ }
+ if (std.mem.eql(u8, verb, "pack")) {
+ if (args.len != 4) return error.Usage;
+ _ = try validate(io, input, std.fs.path.basename(input));
+ try native(rediwm_theme_pack(args[2], args[3]));
+ return;
+ }
+ const home = try packs.userDir(a, init.minimal.environ);
+ try std.Io.Dir.cwd().createDirPath(io, home);
+ if (std.mem.eql(u8, verb, "remove")) {
+ if (!packs.validId(input)) return error.InvalidPackId;
+ const path = try std.fs.path.join(a, &.{ home, input });
+ const st = try std.Io.Dir.cwd().statFile(io, path, .{ .follow_symlinks = false });
+ if (st.kind != .directory) return error.InvalidPack;
+ // A broken pack is still removable; the validated ID contains no path.
+ try cursorLink(io, init.minimal.environ, .{ .id = input, .name = input, .bytes = "" }, path, false);
+ var changed_config: ?[]const u8 = null;
+ // A command-line removal follows the same active-pack fallback as UI.
+ if (@import("config").path.resolvePath(init.minimal.environ, a)) |config_path| {
+ var active = @import("config").loader.load(config_path, a, io, init.minimal.environ) catch null;
+ if (active) |*cfg| {
+ defer cfg.deinit();
+ if (std.mem.eql(u8, cfg.theme_base, input)) {
+ changed_config = config_path;
+ const dark = try packs.parse(a, @import("ui").theme_presets.bundled[0].bytes, "rediwm-dark", "");
+ @import("config").loader.replaceThemeOverrides(a, io, config_path, dark.tokens, dark.tokens, "rediwm-dark");
+ @import("config").loader.replaceTaskbarThemeSection(a, io, config_path, null);
+ try @import("config").setting_save.saveCompositor(a, io, config_path, "wallpaper", "");
+ try @import("config").setting_save.saveInput(a, io, config_path, "cursor_theme", "default");
+ try @import("config").setting_save.saveCompositor(a, io, config_path, "dark_mode", true);
+ }
+ }
+ } else |_| {}
+ try std.Io.Dir.cwd().deleteTree(io, path);
+ // Notify readers after deletion, including a pack shadowing a built-in ID.
+ if (changed_config) |config_path| {
+ const bytes = try std.Io.Dir.cwd().readFileAlloc(io, config_path, a, .limited(1 << 20));
+ try std.Io.Dir.cwd().writeFile(io, .{ .sub_path = config_path, .data = bytes });
+ }
+ return;
+ }
+ if (!std.mem.eql(u8, verb, "install") and !std.mem.eql(u8, verb, "export") and !std.mem.eql(u8, verb, "share")) return error.Usage;
+ const template = try std.fmt.allocPrintSentinel(a, "{s}/.staging-XXXXXX", .{home}, 0);
+ if (mkdtemp(template.ptr) == null) return error.StagingFailed;
+ const stage = std.mem.span(template.ptr);
+ defer std.Io.Dir.cwd().deleteTree(io, stage) catch {};
+ var root: []const u8 = stage;
+ var fallback = std.fs.path.basename(input);
+ if (std.mem.eql(u8, verb, "export") or std.mem.eql(u8, verb, "share")) {
+ // export <id> <config> <wallpaper> <logo>; asset paths are frozen by caller.
+ if ((std.mem.eql(u8, verb, "share") and args.len != 7) or (std.mem.eql(u8, verb, "export") and args.len != 6) or !packs.validId(input)) return error.Usage;
+ const cfg = try @import("config").loader.load(std.mem.span(args[3]), a, io, init.minimal.environ);
+ var t = cfg.theme;
+ if (std.mem.span(args[5]).len > 0) {
+ const ext = if (std.ascii.endsWithIgnoreCase(std.mem.span(args[5]), ".svg")) ".svg" else ".png";
+ const dest = try std.fmt.allocPrint(a, "{s}/logo{s}", .{ stage, ext });
+ try native(rediwm_theme_copy(args[5], (try z(dest)).ptr));
+ t.start_button_icon = "";
+ }
+ var bytes: std.ArrayList(u8) = .empty;
+ try bytes.appendSlice(a, try std.fmt.allocPrint(a, "[meta]\nformat = 1\nid = \"{s}\"\nname = \"{s}\"\n", .{ input, input }));
+ try theme.writeInto(a, &bytes, t);
+ if (std.mem.span(args[5]).len > 0) try bytes.appendSlice(a, if (std.ascii.endsWithIgnoreCase(std.mem.span(args[5]), ".svg")) "start_button_icon = \"logo.svg\"\n" else "start_button_icon = \"logo.png\"\n");
+ if (cfg.taskbar_theme) |bar| try theme.writeTaskbarInto(a, &bytes, bar);
+ try bytes.appendSlice(a, if (cfg.compositor.dark_mode) "[assets]\ncolor_scheme = \"dark\"\n" else "[assets]\ncolor_scheme = \"light\"\n");
+ if (std.mem.span(args[4]).len > 0) {
+ const name = std.fs.path.basename(std.mem.span(args[4]));
+ if (!packs.relative(name)) return error.UnsafeAssetPath;
+ const dest = try std.fs.path.join(a, &.{ stage, "wallpapers", name });
+ try native(rediwm_theme_copy(args[4], (try z(dest)).ptr));
+ try bytes.appendSlice(a, try std.fmt.allocPrint(a, "wallpaper = \"{s}\"\n", .{name}));
+ }
+ try std.Io.Dir.cwd().writeFile(io, .{ .sub_path = try std.fs.path.join(a, &.{ stage, "theme.toml" }), .data = bytes.items });
+ } else {
+ try native(rediwm_theme_stage_isolated(args[2], template.ptr));
+ root = try unwrap(io, stage);
+ if (!std.mem.eql(u8, root, stage)) fallback = std.fs.path.basename(root) else if (std.mem.lastIndexOfScalar(u8, fallback, '.')) |dot| fallback = fallback[0..dot];
+ }
+ const p = try validate(io, root, fallback);
+ const destination = try std.fs.path.join(a, &.{ home, p.id });
+ // Replacing requires an explicit flag; Appearance provides the confirmation.
+ if (std.Io.Dir.cwd().access(io, destination, .{})) |_| {
+ if (args.len != 4 or !std.mem.eql(u8, std.mem.span(args[3]), "--replace")) {
+ std.debug.print("Replace {s} {s}?\n", .{ p.name, p.version });
+ return error.AlreadyInstalled;
+ }
+ } else |_| {}
+ try cursorLink(io, init.minimal.environ, p, destination, true);
+ try native(rediwm_theme_publish((try z(root)).ptr, (try z(destination)).ptr));
+ cursorLink(io, init.minimal.environ, p, destination, false) catch |err| {
+ try native(rediwm_theme_rollback((try z(root)).ptr, (try z(destination)).ptr));
+ return err;
+ };
+ if (std.mem.eql(u8, verb, "share")) try native(rediwm_theme_pack((try z(destination)).ptr, args[6]));
+ _ = std.posix.system.write(1, p.id.ptr, p.id.len);
+ _ = std.posix.system.write(1, "\n", 1);
+}
+
+pub fn main(init: std.process.Init) void {
+ run(init) catch |err| {
+ if (err != error.Usage) {
+ std.debug.print("rediwm-theme: {s}\n", .{@errorName(err)});
+ std.process.exit(1);
+ }
+ std.debug.print("rediwm-theme: {s}\nUsage: rediwm-theme install <zip|directory> [--replace] | validate <directory> | pack <directory> <out.rediwm-theme> | remove <id> | export <id> <config> <wallpaper> <logo>\n", .{@errorName(err)});
+ std.process.exit(1);
+ };
+}
diff --git a/src/ui/shell_icons.zig b/src/ui/shell_icons.zig
index ad1a849..9d5d121 100644
--- a/src/ui/shell_icons.zig
+++ b/src/ui/shell_icons.zig
@@ -39,7 +39,106 @@ const Entry = struct { id: IconId, mask: Mask };
var cache: [64]?Entry = @splat(null);
var next: usize = 0;
+var overrides: [std.meta.fields(IconId).len]?[]u8 = @splat(null);
+var pack_root: []const u8 = "";
+var source_mutex: std.posix.system.pthread_mutex_t = .{};
+
+pub fn configure(io: std.Io, root: []const u8) void {
+ _ = std.posix.system.pthread_mutex_lock(&source_mutex);
+ defer _ = std.posix.system.pthread_mutex_unlock(&source_mutex);
+ clearPack();
+ pack_root = if (root.len > 0) std.heap.c_allocator.dupe(u8, root) catch "" else "";
+ if (root.len == 0) return;
+ inline for (.{
+ .{ IconId.git_branch, "git-branch" },
+ .{ IconId.home, "home" },
+ .{ IconId.folder, "folder" },
+ .{ IconId.edit, "edit" },
+ .{ IconId.keyboard, "keyboard" },
+ .{ IconId.settings, "settings" },
+ .{ IconId.mouse, "mouse" },
+ .{ IconId.display, "display" },
+ .{ IconId.headphones, "headphones" },
+ .{ IconId.music, "music" },
+ .{ IconId.wifi, "wifi" },
+ .{ IconId.ethernet, "ethernet" },
+ .{ IconId.globe, "globe" },
+ .{ IconId.bluetooth, "bluetooth" },
+ .{ IconId.battery, "battery" },
+ .{ IconId.notification, "notification-bell" },
+ .{ IconId.volume_low, "speaker" },
+ .{ IconId.volume_muted, "speaker-xmark" },
+ .{ IconId.clock, "clock" },
+ .{ IconId.lock, "lock" },
+ .{ IconId.logout, "logout" },
+ .{ IconId.reboot, "restart" },
+ .{ IconId.power, "power-button" },
+ .{ IconId.eye, "eye" },
+ .{ IconId.eye_off, "eye-off" },
+ .{ IconId.refresh, "refresh" },
+ .{ IconId.cut, "cut" },
+ .{ IconId.copy, "copy" },
+ .{ IconId.paste, "paste" },
+ .{ IconId.trash, "trash-outline" },
+ .{ IconId.trash_can, "trash" },
+ .{ IconId.view_grid, "view-grid" },
+ .{ IconId.view_list, "view-list" },
+ .{ IconId.sort, "sort" },
+ .{ IconId.filter, "filter" },
+ .{ IconId.zoom_in, "zoom-in" },
+ .{ IconId.zoom_out, "zoom-out" },
+ .{ IconId.rotate, "rotate" },
+ .{ IconId.crop, "crop" },
+ .{ IconId.undo, "undo" },
+ .{ IconId.save, "save" },
+ .{ IconId.fit, "fit" },
+ .{ IconId.print, "print" },
+ .{ IconId.open, "open" },
+ .{ IconId.usb_stick, "usb-stick" },
+ .{ IconId.drive, "drive" },
+ .{ IconId.eject, "eject" },
+ .{ IconId.users, "users" },
+ .{ IconId.squares, "squares" },
+ }) |pair| {
+ loadOverride(io, root, pair[0], pair[1]);
+ }
+}
+
+fn loadOverride(io: std.Io, root: []const u8, id: IconId, name: []const u8) void {
+ const path = std.fmt.allocPrint(std.heap.c_allocator, "{s}/glyphs/{s}.svg", .{ root, name }) catch return;
+ defer std.heap.c_allocator.free(path);
+ var i: usize = 1;
+ while (i < path.len) : (i += 1) if (path[i] == '/') {
+ const part = std.Io.Dir.cwd().statFile(io, path[0..i], .{ .follow_symlinks = false }) catch return;
+ if (part.kind == .sym_link) return;
+ };
+ const stat = std.Io.Dir.cwd().statFile(io, path, .{ .follow_symlinks = false }) catch return;
+ if (stat.kind != .file) return;
+ overrides[@intFromEnum(id)] = std.Io.Dir.cwd().readFileAlloc(io, path, std.heap.c_allocator, .limited(64 * 1024)) catch null;
+}
+
+pub fn deinitPack() void {
+ _ = std.posix.system.pthread_mutex_lock(&source_mutex);
+ defer _ = std.posix.system.pthread_mutex_unlock(&source_mutex);
+ clearPack();
+}
+
+fn clearPack() void {
+ deinit();
+ for (&overrides) |*entry| {
+ if (entry.*) |bytes| std.heap.c_allocator.free(bytes);
+ entry.* = null;
+ }
+ if (pack_root.len > 0) std.heap.c_allocator.free(pack_root);
+ pack_root = "";
+}
+
fn source(id: IconId) ?[]const u8 {
+ if (overrides[@intFromEnum(id)]) |bytes| return bytes;
+ return builtinSource(id);
+}
+
+fn builtinSource(id: IconId) ?[]const u8 {
return switch (id) {
.git_branch => @embedFile("shell-icon-git-branch"),
.home => @embedFile("shell-icon-home"),
@@ -94,13 +193,20 @@ fn source(id: IconId) ?[]const u8 {
};
}
+/// The desktop's scan worker owns this mask; it never borrows a UI cache entry.
+pub fn getOwned(id: IconId, size: i32) ?Mask {
+ _ = std.posix.system.pthread_mutex_lock(&source_mutex);
+ defer _ = std.posix.system.pthread_mutex_unlock(&source_mutex);
+ return rasterize(source(id) orelse return null, size) orelse rasterize(builtinSource(id) orelse return null, size);
+}
+
pub fn get(id: IconId, requested_size: i32) ?Mask {
const svg = source(id) orelse return null;
const size = std.math.clamp(requested_size, 1, 256);
for (cache) |entry| if (entry) |e| {
if (e.id == id and e.mask.size == size) return e.mask;
};
- const mask = rasterize(svg, size) orelse return null;
+ const mask = rasterize(svg, size) orelse rasterize(builtinSource(id) orelse return null, size) orelse return null;
if (cache[next]) |old| std.heap.c_allocator.free(old.mask.alpha);
cache[next] = .{ .id = id, .mask = mask };
next = (next + 1) % cache.len;
diff --git a/src/ui/theme.zig b/src/ui/theme.zig
index 105ba26..7a84b54 100644
--- a/src/ui/theme.zig
+++ b/src/ui/theme.zig
@@ -610,7 +610,8 @@ pub fn applyKey(allocator: Allocator, t: *Theme, key: []const u8, value: []const
}
inline for (optional_color_keys) |name| {
if (std.mem.eql(u8, key, name)) {
- @field(t, name) = try parseColor(try unquote(value));
+ const text = try unquote(value);
+ @field(t, name) = if (std.mem.eql(u8, text, "inherit")) null else try parseColor(text);
return;
}
}
@@ -665,9 +666,29 @@ fn appendColor(allocator: Allocator, buf: *std.ArrayList(u8), key: []const u8, c
try appendLine(allocator, buf, "{s} = \"rgba({d},{d},{d},{d:.3})\"\n", .{ key, q[0], q[1], q[2], std.math.clamp(c[3], 0, 1) });
}
+pub fn knownKey(key: []const u8) bool {
+ inline for (std.meta.fields(Theme)) |field| if (std.mem.eql(u8, key, field.name)) return true;
+ return std.mem.eql(u8, key, "taskbar_height");
+}
+
pub fn writeInto(allocator: Allocator, buf: *std.ArrayList(u8), t: Theme) !void {
- const defaults: Theme = .{};
+ return writeOverrides(allocator, buf, t, .{}, "");
+}
+
+pub fn writeOverrides(allocator: Allocator, buf: *std.ArrayList(u8), t: Theme, defaults: Theme, base: []const u8) !void {
+ return writeDiff(allocator, buf, t, defaults, base, base.len == 0);
+}
+
+pub fn saveOverlay(allocator: Allocator, io: Io, path: []const u8, t: Theme, below: Theme) !void {
+ var buf: std.ArrayList(u8) = .empty;
+ defer buf.deinit(allocator);
+ try writeDiff(allocator, &buf, t, below, "", false);
+ try Io.Dir.cwd().writeFile(io, .{ .sub_path = path, .data = buf.items });
+}
+
+fn writeDiff(allocator: Allocator, buf: *std.ArrayList(u8), t: Theme, defaults: Theme, base: []const u8, force_radius: bool) !void {
try buf.appendSlice(allocator, "[theme]\n");
+ if (base.len > 0) try appendLine(allocator, buf, "base = \"{s}\"\n", .{base});
inline for (boolean_keys) |name| {
if (@field(t, name) != @field(defaults, name)) try appendLine(allocator, buf, "{s} = {}\n", .{ name, @field(t, name) });
}
@@ -682,10 +703,9 @@ pub fn writeInto(allocator: Allocator, buf: *std.ArrayList(u8), t: Theme) !void
// Keep the frame radius explicit even at Default, so a legacy
// compositor.border_radius cannot reappear after saving the theme.
if (comptime std.mem.eql(u8, name, "radius_lg")) {
- try appendLine(allocator, buf, "{s} = {d}\n", .{ name, @field(t, name) });
- continue;
+ if (force_radius) try appendLine(allocator, buf, "{s} = {d}\n", .{ name, @field(t, name) });
}
- if (@field(t, name) != @field(defaults, name)) try appendLine(allocator, buf, "{s} = {d}\n", .{ name, @field(t, name) });
+ if ((!force_radius or !std.mem.eql(u8, name, "radius_lg")) and @field(t, name) != @field(defaults, name)) try appendLine(allocator, buf, "{s} = {d}\n", .{ name, @field(t, name) });
}
inline for (color_keys) |name| {
if (!std.meta.eql(quantize(@field(t, name)), quantize(@field(defaults, name)))) try appendColor(allocator, buf, name, @field(t, name));
@@ -694,7 +714,12 @@ pub fn writeInto(allocator: Allocator, buf: *std.ArrayList(u8), t: Theme) !void
// whichever palette happened to be current, turning "follow the accent"
// into a fixed colour on the first save.
inline for (optional_color_keys) |name| {
- if (@field(t, name)) |color| try appendColor(allocator, buf, name, color);
+ const actual = @field(t, name);
+ const original = @field(defaults, name);
+ const equal = if (actual) |value| (if (original) |other| std.meta.eql(quantize(value), quantize(other)) else false) else original == null;
+ if (!equal) {
+ if (@field(t, name)) |color| try appendColor(allocator, buf, name, color) else try appendLine(allocator, buf, "{s} = \"inherit\"\n", .{name});
+ }
}
}
diff --git a/src/ui/theme_presets.zig b/src/ui/theme_presets.zig
index 7f57683..3fc87b9 100644
--- a/src/ui/theme_presets.zig
+++ b/src/ui/theme_presets.zig
@@ -1,46 +1,14 @@
-// Named, wholesale theme bundles for the Control Center's Appearance picker.
-// A preset is just raw `[theme]` TOML, parsed with theme.parse like any
-// REDIWM_THEME file; picking one replaces theme.global's fields all at once
-// instead of one slider/swatch at a time.
-const std = @import("std");
-const Allocator = std.mem.Allocator;
-const Io = std.Io;
+//! Embedded fallback packs. Filesystem discovery and metadata parsing live
+//! in config/theme_pack.zig, keeping shared UI independent of configuration.
pub const Preset = struct {
+ id: []const u8 = "",
name: []const u8,
bytes: []const u8,
};
-const bundled = [_]Preset{
- .{ .name = "RediWM Dark", .bytes = @embedFile("theme-rediwm-dark") },
- .{ .name = "RediWM Light", .bytes = @embedFile("theme-rediwm-light") },
- .{ .name = "Redi Blue", .bytes = @embedFile("theme-redi-blue") },
+pub const bundled = [_]Preset{
+ .{ .id = "rediwm-dark", .name = "RediWM Dark", .bytes = @embedFile("theme-rediwm-dark") },
+ .{ .id = "rediwm-light", .name = "RediWM Light", .bytes = @embedFile("theme-rediwm-light") },
+ .{ .id = "redi-blue", .name = "Redi Blue", .bytes = @embedFile("theme-redi-blue") },
};
-
-/// Bundled presets, followed by every `*.toml` file found in
-/// `dirname(config_path)/themes/` (stem = display name). Best-effort like the
-/// rest of this codebase's file IO: a missing config path or unreadable
-/// directory just yields the bundled list. Returned slice is allocated from
-/// `allocator`, meant to be a caller-owned arena reset each time the panel
-/// that calls this rebuilds.
-pub fn list(allocator: Allocator, io: Io, config_path: []const u8) []const Preset {
- var out: std.ArrayList(Preset) = .empty;
- out.appendSlice(allocator, &bundled) catch return &bundled;
-
- const dir_path = std.fs.path.dirname(config_path) orelse return out.items;
- var themes_dir_buf: [std.posix.PATH_MAX]u8 = undefined;
- const themes_path = std.fmt.bufPrint(&themes_dir_buf, "{s}/themes", .{dir_path}) catch return out.items;
- var dir = Io.Dir.cwd().openDir(io, themes_path, .{ .iterate = true }) catch return out.items;
- defer dir.close(io);
-
- var it = dir.iterate();
- while (it.next(io) catch null) |entry| {
- if (!std.mem.endsWith(u8, entry.name, ".toml")) continue;
- var path_buf: [std.posix.PATH_MAX]u8 = undefined;
- const full = std.fmt.bufPrint(&path_buf, "{s}/{s}", .{ themes_path, entry.name }) catch continue;
- const bytes = Io.Dir.cwd().readFileAlloc(io, full, allocator, .limited(1 << 20)) catch continue;
- const name = allocator.dupe(u8, entry.name[0 .. entry.name.len - ".toml".len]) catch continue;
- out.append(allocator, .{ .name = name, .bytes = bytes }) catch continue;
- }
- return out.items;
-}
diff --git a/src/workspace_persistence.zig b/src/workspace_persistence.zig
index 6315cb9..8233908 100644
--- a/src/workspace_persistence.zig
+++ b/src/workspace_persistence.zig
@@ -278,6 +278,7 @@ pub const Restore = struct {
if (saved.order == order and id != null and server.findToplevelById(id.?) != null) slot.focus = id;
};
}
+ server.world.workspaces.tiler.quiet = true;
server.world.workspaces.tiler.schedule(server);
server.world.workspaces.refresh(server);
}
diff --git a/src/workspaces.zig b/src/workspaces.zig
index bd2112d..bf66ad9 100644
--- a/src/workspaces.zig
+++ b/src/workspaces.zig
@@ -60,6 +60,7 @@ pub fn mapped(self: *Self, top: *Top) void {
top.auto_float_override = null;
top.auto_seen = null;
top.auto_reinsert = null;
+ top.auto_anchor = null;
}
if (top.parentWindow()) |parent| top.workspace_id = parent.workspace_id;
if (top.workspace_id == 0) {
@@ -69,6 +70,8 @@ pub fn mapped(self: *Self, top: *Top) void {
if (top.workspace_order == 0) {
top.workspace_order = self.next_order;
self.next_order += 1;
+ // Called before the new window takes focus: this is the one it splits.
+ if (top.workspace_id != 0) top.auto_anchor = self.slots[top.workspace_id - 1].focus;
}
if (top.server.layout_autosave) |autosave| autosave.mapped(top);
top.zoom_index = 0;
@@ -107,6 +110,7 @@ pub fn setMode(self: *Self, server: *Server, enabled: bool) void {
self.changing = true;
defer self.changing = false;
cancelGestures(server);
+ finishTransitions(server);
server.undo.clear();
const applying = server.undo.applying;
server.undo.applying = true;
@@ -135,6 +139,7 @@ pub fn setMode(self: *Self, server: *Server, enabled: bool) void {
top.auto_float_override = null;
top.auto_seen = null;
top.auto_reinsert = null;
+ top.auto_anchor = null;
top.workspace_generation = self.generation;
top.workspace_order = self.next_order;
self.next_order += 1;
@@ -165,6 +170,7 @@ pub fn setMode(self: *Self, server: *Server, enabled: bool) void {
var outputs = server.outputs.iterator(.forward);
while (outputs.next()) |output| output.workspace_id = 0;
}
+ self.tiler.quiet = true;
self.tiler.schedule(server);
self.refresh(server);
focusFallback(server, null);
@@ -219,12 +225,14 @@ pub fn syncOutputs(self: *Self, server: *Server) void {
const box = output.usableBox();
if (moved or !std.meta.eql(box, slot.box)) {
if (server.input.tiling_grab != null) server.input.finishTilingGrab(false);
+ finishTransitions(server);
var tops = server.world.toplevels.iterator(.forward);
while (tops.next()) |top| if (top.workspace_id == index + 1) {
_ = top.moveFromUsableToOutput(slot.box, output);
fit(top, output);
};
slot.box = box;
+ self.tiler.quiet = true;
}
}
self.tiler.schedule(server);
@@ -242,16 +250,66 @@ pub fn switchTo(self: *Self, server: *Server, id: u8) void {
slot.exists = true;
slot.output = output;
slot.box = output.usableBox();
+ const previous = output.workspace_id;
output.workspace_id = id;
// Selecting a workspace on another output focuses that output, never
// duplicates membership onto the output under the pointer.
if (Output.atLayout(server, server.input.cursor.x, server.input.cursor.y) != output) {
_ = server.input.cursor.warp(null, @as(f64, @floatFromInt(slot.box.x)) + @as(f64, @floatFromInt(slot.box.width)) / 2, @as(f64, @floatFromInt(slot.box.y)) + @as(f64, @floatFromInt(slot.box.height)) / 2);
}
+ transition(server, output, previous, id);
self.refresh(server);
focusFallback(server, id);
}
+/// Slides the workspace `output` showed out and `id`'s in, the higher number
+/// arriving from the right (or below), along an axis no other display shares;
+/// with displays on both axes, or reduced motion, they cross-fade. Runs before
+/// `refresh`, while a frame still says whether its window was shown.
+fn transition(server: *Server, output: *Output, previous: u8, id: u8) void {
+ if (previous == 0 or previous == id) return;
+ const box = output.cached_box;
+ const sign: f32 = if (id > previous) 1 else -1;
+ var dx: f32 = 0;
+ var dy: f32 = 0;
+ if (@import("ui").anim.reducedMotion()) {
+ // Motion is off; the fade is what remains of the transition.
+ } else if (clearOfOutputs(server, output, .{ .x = box.x - box.width, .y = box.y, .width = 3 * box.width, .height = box.height })) {
+ dx = sign * @as(f32, @floatFromInt(box.width));
+ } else if (clearOfOutputs(server, output, .{ .x = box.x, .y = box.y - box.height, .width = box.width, .height = 3 * box.height })) {
+ dy = sign * @as(f32, @floatFromInt(box.height));
+ }
+ const fade = dx == 0 and dy == 0;
+ var tops = server.world.toplevels.iterator(.forward);
+ while (tops.next()) |top| {
+ if (!top.in_world or top.closing) continue;
+ const shown = top.frame_tree.node.enabled;
+ if (top.workspace_id == id and @import("window_tabs.zig").visible(top)) {
+ // A window moved along with the switch is already in place.
+ if (!shown or top.switch_leaving) top.switchIn(dx, dy, fade);
+ } else if (top.workspace_id == previous and shown and !top.switch_leaving) {
+ top.switchOut(-dx, -dy, fade);
+ }
+ }
+}
+
+/// Whether no output but `output` meets `strip`, the band a slide crosses.
+fn clearOfOutputs(server: *Server, output: *Output, strip: wlr.Box) bool {
+ var outputs = server.outputs.iterator(.forward);
+ while (outputs.next()) |other| {
+ if (other == output or !other.isLogicallyEnabled()) continue;
+ const b = other.cached_box;
+ if (b.x < strip.x + strip.width and strip.x < b.x + b.width and b.y < strip.y + strip.height and strip.y < b.y + b.height) return false;
+ }
+ return true;
+}
+
+/// Ends every workspace switch transition at once.
+fn finishTransitions(server: *Server) void {
+ var tops = server.world.toplevels.iterator(.forward);
+ while (tops.next()) |top| top.finishSwitch();
+}
+
pub fn cycle(self: *Self, server: *Server, forward: bool) void {
const output = server.getDefaultOutput() orelse return;
if (!self.active or output.workspace_id == 0) return;
@@ -299,6 +357,8 @@ fn transfer(self: *Self, top: *Top, id: u8, translate: bool) void {
const owner = root(member);
if (owner != leader and (leader.tab_group == 0 or owner.tab_group != leader.tab_group)) continue;
member.workspace_id = id;
+ // Joins beside the destination's focused window, as a new one would.
+ member.auto_anchor = slot.focus;
if (source) |out| {
if (translate and out != destination) _ = member.moveFromUsableToOutput(out.usableBox(), destination);
}
@@ -408,6 +468,7 @@ fn restoreCanvas(top: *Top, topology_changed: bool) void {
top.auto_float_override = null;
top.auto_seen = null;
top.auto_reinsert = null;
+ top.auto_anchor = null;
if (top.canvas_state) |saved| {
if (top.fullscreen) top.setFullscreen(false);
top.leaveLayout();
diff --git a/tests/appearance_settings.py b/tests/appearance_settings.py
index 9feeb17..d3a01db 100644
--- a/tests/appearance_settings.py
+++ b/tests/appearance_settings.py
@@ -398,7 +398,7 @@ def test_appearance_settings():
taskbar["x"] + 40, taskbar["y"] + 38))
assert sum(max(logo.getpixel((x, y))) < 100 for y in range(logo.height) for x in range(logo.width)) > 100, "Light R logo is not dark"
light_theme = read_config()["theme"]
- assert light_theme["shell_accent"].startswith("rgba(14,165,160,")
+ assert light_theme == {"base": "rediwm-light"}, light_theme
for name in ("caret", "selection", "selection_fg", "field_border_focus"):
assert name not in light_theme
@@ -426,7 +426,7 @@ def test_appearance_settings():
assert all(abs(a - b) < 0.001 for a, b in zip(tokens["window_fg"], [31 / 255, 36 / 255, 48 / 255, 1]))
assert ui.scroll_into_view("theme")["selected_index"] == 1
assert read_config()["taskbar_theme"] == {}
- assert read_config()["theme"]["shell_accent"].startswith("rgba(14,165,160,")
+ assert read_config()["theme"] == {"base": "rediwm-light"}
ipc.reload_config()
ipc.close_panel("control_center")
ipc.wait_for("control_center_closed", timeout_ms=5000)
@@ -507,9 +507,9 @@ def test_appearance_settings():
expected = min(defaults[name], 4) if index == 0 else defaults[name] * (1.3 if index == 2 else 1)
assert abs(tokens[name] - expected) < 0.001, (index, name, tokens[name], expected)
assert ui.scroll_into_view("radius")["selected_index"] == index
- assert abs(read_config()["theme"]["radius_lg"] - tokens["radius_lg"]) < 0.001
+ assert abs(read_config()["theme"].get("radius_lg", defaults["radius_lg"]) - tokens["radius_lg"]) < 0.001
# A legacy compositor value cannot override an explicit theme radius.
- config_path.write_text(config_path.read_text().replace("radius_lg = 10", "radius_lg = 2.5") +
+ config_path.write_text(config_path.read_text().replace('base = "rediwm-dark"', 'base = "rediwm-dark"\nradius_lg = 2.5') +
"\n[compositor]\nborder_radius = 24\n")
ipc.reload_config()
ipc.wait_for_panel_settled("control_center")
diff --git a/tests/appearance_wallpaper.py b/tests/appearance_wallpaper.py
index b8e530a..5ca51f9 100644
--- a/tests/appearance_wallpaper.py
+++ b/tests/appearance_wallpaper.py
@@ -14,6 +14,9 @@ from PIL import Image
from desktop_zoom import wait_for
from ipc_client import IPCClient, spawn_compositor, stop_process
+from ui_driver import UIDriver
+
+ROOT = Path(__file__).resolve().parents[1]
AQUA = (20, 200, 190)
STRIPES = (200, 60, 30)
@@ -70,7 +73,38 @@ def run():
def widgets():
return ipc.get_widget_tree("control_center")["widgets"]
+ def ensure_visible(widget):
+ if not widget.get("name"):
+ return widget
+ name = widget["name"]
+ panel = ipc.get_shell_state()["control_center"]["box"]
+ box = widget["box"]
+ viewport = next(w for w in widgets() if w["role"] == "scroll_container")["global_box"]
+ y = panel["y"] + box["y"] + box["height"] / 2
+ is_tile = name.startswith(("wallpaper_tile_", "wallpaper_check_"))
+ if not viewport["y"] < y < viewport["y"] + viewport["height"]:
+ UIDriver(ipc).scroll_into_view("wallpaper_strip" if is_tile else name)
+ step, previous = -180, None
+ for _ in range(20 if is_tile else 1):
+ widget = next(w for w in widgets() if w["name"] == name)
+ if not is_tile:
+ return widget
+ strip = next(w for w in widgets() if w["name"] == "wallpaper_strip")["global_box"]
+ box = widget["global_box"]
+ x = box["x"] + box["width"] / 2
+ if strip["x"] + 3 < x < strip["x"] + strip["width"] - 3:
+ return widget
+ distance = abs(x - (strip["x"] + strip["width"] / 2))
+ if previous is not None and distance >= previous:
+ step = -step
+ previous = distance
+ ipc.move_cursor(round(strip["x"] + strip["width"] / 2), round(strip["y"] + strip["height"] / 2))
+ ipc.scroll(0, step if x > strip["x"] else -step)
+ time.sleep(.3)
+ raise AssertionError(f"could not scroll {name} into view")
+
def click(widget):
+ widget = ensure_visible(widget)
panel = ipc.get_shell_state()["control_center"]["box"]
box = widget["box"]
ipc.click_at(round(panel["x"] + box["x"] + box["width"] / 2),
@@ -91,6 +125,7 @@ def run():
return [w["name"] for w in prefixed("wallpaper_check_") if w["checked"]]
def centre(widget):
+ widget = ensure_visible(widget)
panel = ipc.get_shell_state()["control_center"]["box"]
box = widget["box"]
return (round(panel["x"] + box["x"] + box["width"] / 2),
@@ -122,27 +157,31 @@ def run():
assert not named("wallpaper_folder")["is_disabled"]
# The strip lists the same images as the dropdown, ticking the
# bundled default; a tile or its tick box selects.
- assert len(prefixed("wallpaper_tile_")) == 3
+ bundled = ROOT / "zig-out/share/rediwm/wallpapers"
+ bundled_count = sum(p.is_file() and not p.name.startswith(".") and p.suffix.lower() in (".png", ".jpg", ".jpeg", ".webp") and p.name not in ("aqua.png", "zebra_stripes.jpg") for p in bundled.iterdir())
+ total_wallpapers = bundled_count + 2
+ aqua_index, zebra_index = bundled_count, bundled_count + 1
+ assert len(prefixed("wallpaper_tile_")) == total_wallpapers
assert ticked() == ["wallpaper_check_0"], ticked()
- click(named("wallpaper_tile_1"))
+ click(named(f"wallpaper_tile_{aqua_index}"))
assert saved() == "aqua.png", config_path.read_text()
wait_color(AQUA, "strip tile")
- wait_for(lambda: ticked() == ["wallpaper_check_1"], "tick follows the tile")
- click(named("wallpaper_check_2"))
+ wait_for(lambda: ticked() == [f"wallpaper_check_{aqua_index}"], "tick follows the tile")
+ click(named(f"wallpaper_check_{zebra_index}"))
assert saved() == "zebra_stripes.jpg"
wait_color(STRIPES, "strip tick box")
- click(named("wallpaper_check_2"))
+ click(named(f"wallpaper_check_{zebra_index}"))
assert saved() == "zebra_stripes.jpg"
- wait_for(lambda: ticked() == ["wallpaper_check_2"], "ticking the current image keeps it ticked")
+ wait_for(lambda: ticked() == [f"wallpaper_check_{zebra_index}"], "ticking the current image keeps it ticked")
click(named("wallpaper_tile_0"))
assert saved() == ""
wait_color(default, "bundled default from the strip")
# RediWM's own, then the user's by label: Aqua, Zebra stripes.
- pick(1)
+ pick(aqua_index)
assert saved() == "aqua.png", config_path.read_text()
wait_color(AQUA, "user PNG")
- wait_for(lambda: ticked() == ["wallpaper_check_1"], "dropdown moves the tick")
- pick(2)
+ wait_for(lambda: ticked() == [f"wallpaper_check_{aqua_index}"], "dropdown moves the tick")
+ pick(zebra_index)
assert saved() == "zebra_stripes.jpg"
wait_color(STRIPES, "user JPEG")
pick(0)
@@ -181,7 +220,7 @@ def run():
# returns fills the strip, without changing the wallpaper.
config_path.write_text('[compositor]\nxwayland = false\n')
wait_color(default, "default wallpaper again")
- wait_for(lambda: len(prefixed("wallpaper_tile_")) == 3, "wallpaper directories listed again")
+ wait_for(lambda: len(prefixed("wallpaper_tile_")) == total_wallpapers, "wallpaper directories listed again")
# Below the fold: wheel the page over the wallpaper selector until it shows.
x, y = centre(named("wallpaper"))
diff --git a/tests/fixtures/theme-pack/glyphs/wifi.svg b/tests/fixtures/theme-pack/glyphs/wifi.svg
new file mode 100644
index 0000000..d2ce022
--- /dev/null
+++ b/tests/fixtures/theme-pack/glyphs/wifi.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="white" d="M0 0h24v24H0z"/></svg>
diff --git a/tests/fixtures/theme-pack/icons/folder.svg b/tests/fixtures/theme-pack/icons/folder.svg
new file mode 100644
index 0000000..d953945
--- /dev/null
+++ b/tests/fixtures/theme-pack/icons/folder.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64"><rect x="2" y="2" width="60" height="60" rx="4" fill="#f42ca0"/></svg>
diff --git a/tests/fixtures/theme-pack/logo.svg b/tests/fixtures/theme-pack/logo.svg
new file mode 100644
index 0000000..eef4091
--- /dev/null
+++ b/tests/fixtures/theme-pack/logo.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64"><circle cx="32" cy="32" r="28" fill="#21dbaf"/></svg>
diff --git a/tests/fixtures/theme-pack/theme.toml b/tests/fixtures/theme-pack/theme.toml
new file mode 100644
index 0000000..f211bdc
--- /dev/null
+++ b/tests/fixtures/theme-pack/theme.toml
@@ -0,0 +1,14 @@
+[meta]
+format = 1
+id = "test-pack"
+name = "Test Pack"
+version = "1.0"
+author = "RediWM tests"
+license = "CC0-1.0"
+[theme]
+accent = "#f42ca0"
+window_bg = "#142850"
+start_button_icon = "logo.svg"
+[assets]
+wallpaper = "test.png"
+color_scheme = "dark"
diff --git a/tests/fixtures/theme-pack/wallpapers/test.png b/tests/fixtures/theme-pack/wallpapers/test.png
new file mode 100644
index 0000000..6552128
Binary files /dev/null and b/tests/fixtures/theme-pack/wallpapers/test.png differ
diff --git a/tests/theme_packs.py b/tests/theme_packs.py
new file mode 100644
index 0000000..701634c
--- /dev/null
+++ b/tests/theme_packs.py
@@ -0,0 +1,235 @@
+#!/usr/bin/env python3
+"""Theme packs: isolated installs, live assets, layering and hostile archives."""
+import json
+import os
+from pathlib import Path
+import shutil
+import stat
+import struct
+import subprocess
+import tempfile
+import time
+import tomllib
+import zipfile
+import zlib
+from PIL import Image
+from ipc_client import IPCClient, IPCError, spawn_compositor, stop_process
+from desktop_zoom import wait_for
+from ui_driver import UIDriver
+
+ROOT = Path(__file__).resolve().parents[1]
+HELPER = ROOT / "zig-out/bin/rediwm-theme"
+FIXTURE = ROOT / "tests/fixtures/theme-pack"
+PINK = (244, 44, 160)
+
+
+def helper(env, *args, ok=True):
+ result = subprocess.run([str(HELPER), *map(str, args)], env=env, capture_output=True, text=True, timeout=35)
+ assert (result.returncode == 0) == ok, (args, result.stdout, result.stderr)
+ return result
+
+
+def hostile_archives(tmp, env):
+ manifest = (FIXTURE / "theme.toml").read_bytes()
+ cases = {
+ "traversal": [("../outside", b"x", None)],
+ "absolute": [("/tmp/escape", b"x", None)],
+ "symlink": [("logo.svg", b"/etc/passwd", stat.S_IFLNK | 0o777)],
+ "device": [("device", b"", stat.S_IFCHR | 0o600)],
+ "script": [("run.sh", b"echo hostile", None)],
+ "malformed": [("theme.toml", b"[theme\naccent nope", None)],
+ "bomb": [("wallpapers/bomb.png", b"\0" * (40 * 1024 * 1024 + 1), None)],
+ "count": [(f"icons/{i}.svg", b"", None) for i in range(4001)],
+ "glyph-size": [("glyphs/wifi.svg", b"x" * (64 * 1024 + 1), None)],
+ "format": [("theme.toml", b"[meta]\nformat = 2\n", None)],
+ "cursor-alias": [("cursors/cursors/default", b"../outside", stat.S_IFLNK | 0o777)],
+ }
+ def chunk(tag, data):
+ return struct.pack(">I", len(data)) + tag + data + struct.pack(">I", zlib.crc32(tag + data))
+ giant = b"\x89PNG\r\n\x1a\n" + chunk(b"IHDR", struct.pack(">IIBBBBB", 40000, 40000, 8, 2, 0, 0, 0)) + chunk(b"IEND", b"")
+ chunk_data = b"\0" * (34 * 1024 * 1024)
+ cases["total-limit"] = [(f"wallpapers/{i}.png", chunk_data, None) for i in range(4)]
+ slow = b'<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256"><defs><filter id="f">' + b'<feGaussianBlur stdDeviation="5"/>' * 1000 + b'</filter></defs><rect width="256" height="256" filter="url(#f)"/></svg>'
+ cases["slow-glyph"] = [("glyphs/wifi.svg", slow, None)]
+ cases["huge-image"] = [("wallpapers/test.png", giant, None)]
+ for name, entries in cases.items():
+ archive = tmp / f"bad-{name}.zip"
+ with zipfile.ZipFile(archive, "w", compression=zipfile.ZIP_DEFLATED) as out:
+ if name not in ("malformed", "format"):
+ out.writestr("theme.toml", manifest)
+ for path, data, mode in entries:
+ info = zipfile.ZipInfo(path)
+ info.compress_type = zipfile.ZIP_DEFLATED
+ if mode is not None:
+ info.create_system = 3
+ info.external_attr = mode << 16
+ out.writestr(info, data)
+ result = helper(env, "install", archive, ok=False)
+ assert result.stderr.strip(), name
+ themes = Path(env["XDG_DATA_HOME"]) / "rediwm/themes"
+ assert not any(themes.iterdir()), (name, list(themes.iterdir()))
+ source = tmp / "symlink-source"
+ shutil.copytree(FIXTURE, source)
+ (source / "icons/folder.svg").unlink()
+ (source / "icons/folder.svg").symlink_to("/etc/passwd")
+ helper(env, "install", source, ok=False)
+
+
+def run():
+ with tempfile.TemporaryDirectory(prefix="rediwm-theme-packs-") as directory:
+ tmp = Path(directory)
+ env = dict(os.environ, XDG_DATA_HOME=str(tmp / "data"), XDG_STATE_HOME=str(tmp / "state"),
+ XDG_CONFIG_HOME=str(tmp / "config"), XDG_CACHE_HOME=str(tmp / "cache"),
+ DBUS_SESSION_BUS_ADDRESS="", DBUS_SYSTEM_BUS_ADDRESS="unix:path=/nonexistent",
+ REDIWM_FILES_DEVICES="0", REDIWM_DESKTOP_BUILTINS="0", REDIWM_DESKTOP_DIR=str(tmp / "desktop"))
+ env.pop("REDIWM_THEME", None)
+ env.pop("REDIWM_CONFIG", None)
+ env.pop("REDIWM_SOCKET", None)
+ hostile_archives(tmp, env)
+ pack = tmp / "source"
+ shutil.copytree(FIXTURE, pack)
+ # A real built cursor with the sole allowed alias form.
+ (pack / "cursors/cursors").mkdir(parents=True)
+ shutil.copyfile(ROOT / "zig-out/share/icons/phinger-cursors-dark/cursors/default", pack / "cursors/cursors/left_ptr")
+ (pack / "cursors/cursors/default").symlink_to("left_ptr")
+ (pack / "cursors/index.theme").write_text("[Icon Theme]\nName=Test pack cursors\n")
+ with (pack / "theme.toml").open("a") as out:
+ out.write('cursor_theme = "pack"\n')
+ archive = tmp / "fixture.rediwm-theme"
+ helper(env, "validate", pack)
+ helper(env, "pack", pack, archive)
+ (tmp / "desktop/Folder").mkdir(parents=True)
+ (tmp / "files/Folder").mkdir(parents=True)
+ proc, log = spawn_compositor(tmp, config_content='[compositor]\nxwayland = false\n[desktop]\nenabled = true\n[input]\npointer_speed = 0.4\n', env_extra={k: v for k, v in env.items() if k.startswith(("XDG_", "REDIWM_", "DBUS_")) and k != "XDG_RUNTIME_DIR"})
+ files = None
+ try:
+ with IPCClient(tmp, timeout=30) as ipc:
+ before = ipc.query("theme.list")
+ assert {p["id"] for p in before["packs"]} >= {"rediwm-dark", "rediwm-light", "redi-blue"}
+ installed = ipc.action("theme.install", {"path": str(archive)})
+ assert installed["id"] == "test-pack", installed
+ try:
+ ipc.action("theme.install", {"path": str(archive)})
+ raise AssertionError("duplicate install accepted without replacement")
+ except IPCError as err:
+ assert "AlreadyInstalled" in str(err)
+ ipc.action("theme.apply", {"id": "test-pack"})
+ assert ipc.query("theme.list")["active"] == "test-pack"
+ cfg = tomllib.loads((tmp / "rediwm-config.toml").read_text())
+ assert cfg["theme"] == {"base": "test-pack"}, cfg["theme"]
+ assert cfg["compositor"]["wallpaper"] == ""
+ assert cfg["compositor"]["dark_mode"]
+ assert cfg["input"]["pointer_speed"] == .4
+ assert cfg["input"]["cursor_theme"] == "rediwm-test-pack-cursors"
+ cursor_link = tmp / "data/icons/rediwm-test-pack-cursors"
+ assert cursor_link.is_symlink()
+ wait_for(lambda: ipc.query("get_wallpaper")["displayed_path"] == str(tmp / "data/rediwm/themes/test-pack/wallpapers/test.png"), "pack wallpaper was not presented")
+ ipc.wait_for_frame()
+ shot = tmp / "pack.png"
+ ipc.screenshot(str(shot))
+ colors = dict((color, count) for count, color in Image.open(shot).convert("RGB").getcolors(1280 * 720 * 4))
+ assert colors.get((18, 90, 130), 0) > 5000, "pack wallpaper pixels missing"
+ def desktop_has_folder():
+ shot.unlink(missing_ok=True)
+ ipc.screenshot(str(shot))
+ return any(color == PINK for color in Image.open(shot).convert("RGB").getdata())
+ wait_for(desktop_has_folder, "desktop folder did not use pack icon")
+ assert colors.get((33, 219, 175), 0) > 10, "pack start logo pixels missing"
+ # App clients resolve base through their normal settings worker.
+ display = next(p.name for p in tmp.glob("wayland-*") if not p.name.endswith(".lock"))
+ client_env = dict(env, WAYLAND_DISPLAY=display, XDG_RUNTIME_DIR=str(tmp), REDIWM_CONFIG=str(tmp / "rediwm-config.toml"))
+ files = subprocess.Popen([str(ROOT / "zig-out/bin/rediwm-files"), str(tmp / "files")], env=client_env, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
+ wait_for(lambda: any(w["app_id"] == "rediwm-files" for w in ipc.get_windows()), "Files did not map")
+ win = next(w for w in ipc.get_windows() if w["app_id"] == "rediwm-files")
+ ipc.action("move_window_to", {"id": win["id"], "x": 180, "y": 80})
+ ipc.wait_for("window_geometry_settled", window_id=win["id"])
+ files_shot = tmp / "files-pack.png"
+ def files_has_folder():
+ files_shot.unlink(missing_ok=True)
+ ipc.screenshot(str(files_shot))
+ box = ipc.get_window_debug(win["id"])["client_box"]
+ pixels = Image.open(files_shot).convert("RGB").crop((box["x"], box["y"], box["x"] + box["width"], box["y"] + box["height"]))
+ return any(color == PINK for color in pixels.getdata())
+ wait_for(files_has_folder, "Files did not use pack folder icon")
+ ipc.action("set_accent_color", {"color": "#112233"})
+ cfg = tomllib.loads((tmp / "rediwm-config.toml").read_text())
+ assert set(cfg["theme"]) == {"base", "accent"}, cfg["theme"]
+ # Atomic replacement updates unset tokens, keeping the override.
+ replacement = tmp / "replacement"
+ shutil.copytree(pack, replacement, symlinks=True)
+ manifest_path = replacement / "theme.toml"
+ manifest_path.write_text(manifest_path.read_text().replace('version = "1.0"', 'version = "2.0"').replace('window_bg = "#142850"', 'window_bg = "#204060"'))
+ ipc.action("theme.install", {"path": str(replacement), "replace": True})
+ tokens = ipc.action("get_theme")["tokens"]
+ assert all(abs(a - b) < .001 for a, b in zip(tokens["accent"], [17/255, 34/255, 51/255, 1]))
+ assert all(abs(a - b) < .001 for a, b in zip(tokens["window_bg"], [32/255, 64/255, 96/255, 1]))
+ exported = tmp / "exported.rediwm-theme"
+ export_env = dict(env, REDIWM_CONFIG=str(tmp / "rediwm-config.toml"))
+ helper(export_env, "share", "exported", tmp / "rediwm-config.toml", tmp / "data/rediwm/themes/test-pack/wallpapers/test.png", tmp / "data/rediwm/themes/test-pack/logo.svg", exported)
+ assert exported.is_file()
+ helper(env, "validate", tmp / "data/rediwm/themes/exported")
+ helper(env, "remove", "exported")
+ ipc.action("theme.apply", {"id": "test-pack"})
+ assert tomllib.loads((tmp / "rediwm-config.toml").read_text())["theme"] == {"base": "test-pack"}
+ ipc.action("open_appearance")
+ ui = UIDriver(ipc)
+ ui.wait_present("theme_reset")
+ ipc.wait_for_panel_settled("control_center")
+ ipc.move_cursor(2, 2)
+ nav = next(w for w in ipc.get_widget_tree("control_center")["widgets"] if w.get("name") == "network" and w.get("role") == "row")
+ panel = ipc.get_shell_state()["control_center"]["box"]
+ box = nav["box"]
+ glyph_shot = tmp / "glyph.png"
+ ipc.screenshot(str(glyph_shot))
+ x = round(panel["x"] + box["x"] + 16)
+ y = round(panel["y"] + box["y"] + (box["height"] - 22) / 2)
+ glyph = Image.open(glyph_shot).convert("RGB").crop((x, y, x+22, y+22))
+ fg = tuple(round(c*255) for c in ipc.action("get_theme")["tokens"]["window_fg"][:3])
+ assert sum(color == fg for color in glyph.getdata()) > 350, "shell glyph override missing"
+ ui.click("theme_reset")
+ assert ipc.query("theme.list")["active"] == "test-pack"
+ ipc.action("close_panel", {"panel": "control_center"})
+ ipc.action("theme.apply", {"id": "rediwm-light"})
+ assert not ipc.action("get_theme")["dark_mode"]
+ wait_for(lambda: "test-pack" not in (ipc.query("get_wallpaper")["displayed_path"] or ""), "wallpaper did not restore")
+ ipc.action("theme.apply", {"id": "test-pack"})
+ ipc.action("open_appearance")
+ ui.click(ui.scroll_into_view("theme_remove"))
+ wait_for(lambda: all(p["id"] != "test-pack" for p in ipc.query("theme.list")["packs"]), "active pack was not removed")
+ assert ipc.query("theme.list")["active"] == "rediwm-dark"
+ ipc.action("close_panel", {"panel": "control_center"})
+ assert not cursor_link.exists()
+ assert all(p["id"] != "test-pack" for p in ipc.query("theme.list")["packs"])
+ # A user pack can shadow a built-in ID; removal restores embedded art.
+ shadow = tmp / "shadow"
+ shutil.copytree(pack, shadow, symlinks=True)
+ manifest_path = shadow / "theme.toml"
+ manifest_path.write_text(manifest_path.read_text().replace('id = "test-pack"', 'id = "rediwm-dark"'))
+ ipc.action("theme.install", {"path": str(shadow)})
+ ipc.action("theme.apply", {"id": "rediwm-dark"})
+ ipc.action("open_appearance")
+ ui.click(ui.scroll_into_view("theme_remove"))
+ wait_for(lambda: not next(p for p in ipc.query("theme.list")["packs"] if p["id"] == "rediwm-dark")["user_installed"] and ipc.action("get_theme")["tokens"]["start_button_icon"] == "", "embedded pack was not restored")
+ tokens = ipc.action("get_theme")["tokens"]
+ assert tokens["start_button_icon"] == "", tokens["start_button_icon"]
+ ipc.action("close_panel", {"panel": "control_center"})
+ # Missing pack falls back; the config remains usable.
+ config = tmp / "rediwm-config.toml"
+ config.write_text(config.read_text().replace('base = "rediwm-dark"', 'base = "missing-pack"'))
+ ipc.reload_config()
+ assert ipc.get_outputs()
+ stop_process(proc)
+ assert proc.returncode == 0, (tmp / "compositor.log").read_text()
+ except Exception:
+ print((tmp / "compositor.log").read_text())
+ raise
+ finally:
+ if files is not None:
+ stop_process(files)
+ if proc.poll() is None:
+ stop_process(proc)
+ log.close()
+ print("PASS: pack installs, security limits, assets, layering, reset, cursors and removal")
+
+if __name__ == "__main__":
+ run()
diff --git a/tests/workspaces.py b/tests/workspaces.py
index 4696a3d..b044107 100644
--- a/tests/workspaces.py
+++ b/tests/workspaces.py
@@ -21,6 +21,9 @@ def run(outputs=1):
desktop_mode = "canvas"
focus_zoom = "keep"
snap_to_edges = false
+# Slow workspace slides: the hidden-input checks run while the old workspace
+# is still sliding off screen.
+desktop_switch_ms = 3000
[keybinds]
"Super+q" = "noop"
"Super+F12" = "noop"
@@ -142,6 +145,8 @@ snap_to_edges = false
assert workspace() == 5 and focused() == settings
ipc.action("close_window", {"id": settings})
ipc.focus_window(b)
+ # Input follows the slide: grab b once it has arrived.
+ ipc.wait_for("window_geometry_settled", window_id=b, timeout_ms=10000)
# Explicit placement floats a tile; Super-drag never pans the camera.
ipc.action("move_window_to", {"id": b, "x": 100, "y": 120})
ipc.wait_for_frame()
@@ -430,6 +435,7 @@ enabled = false
wait_for(lambda: all(w["id"] != d for w in ipc.get_windows()), "close destination tile")
# Closing the focused leaf after a resize does not consume
# undo or resurrect it; the remaining split keeps its ratio.
+ ipc.focus_window(b)
c, cc = launch("controls-undo-closed")
wait_for(lambda: frame(b)[3] < halves[b][3], "undo third tile")
baseline = {a: frame(a), b: frame(b)}
@@ -682,8 +688,9 @@ window_gap = 8
ipc.key_down_up(87)
ipc.action("tiling_action", {"id": a, "action": "toggle_floating"})
expect(a, half); expect(b, right)
+ # A new window splits the focused tile along its longer side.
+ ipc.focus_window(b)
c, cc = launch("auto-c", "0 0 0 0")
- # The second split follows the longer side of the right tile.
if right[2] >= right[3]:
cw = (right[2] - 8 + 1) // 2
second = (right[0], 8, cw, right[3])
@@ -700,6 +707,21 @@ window_gap = 8
expect(a, half)
expect(b, second)
expect(c, third)
+ # With the older tile focused, a new one splits it, not the newest.
+ if half[2] >= half[3]:
+ dw = (half[2] - 8 + 1) // 2
+ kept, added = (8, 8, dw, half[3]), (16 + dw, 8, half[2] - dw - 8, half[3])
+ else:
+ dh = (half[3] - 8 + 1) // 2
+ kept, added = (8, 8, half[2], dh), (8, 16 + dh, half[2], half[3] - dh - 8)
+ d, cd = launch("auto-d", "0 0 0 0")
+ expect(a, kept)
+ expect(d, added)
+ expect(b, second)
+ expect(c, third)
+ stop_process(cd)
+ wait_for(lambda: all(w["id"] != d for w in ipc.get_windows()), "close d")
+ expect(a, half)
# Minimize and temporary geometry overrides preserve the split.
ipc.focus_window(c)
ipc.key_down_up(68)
@@ -991,9 +1013,12 @@ def xwayland_routing():
box = ipc.get_window_debug(id)["chrome_box"]
return tuple(box[k] for k in ("x", "y", "width", "height"))
wait_for(lambda: rect(one)[0] < rect(two)[0] and rect(one)[2] < 900, "two GTK tiles")
+ for id in (one, two): ipc.wait_for("window_geometry_settled", window_id=id, timeout_ms=5000)
before_one, before_two = rect(one), rect(two)
ipc.action("tiling_action", {"action": "swap_right", "id": one})
wait_for(lambda: rect(one)[0] == before_two[0], "X11 tile swap")
+ # Tiles glide to their new places, and input follows what is shown.
+ for id in (one, two): ipc.wait_for("window_geometry_settled", window_id=id, timeout_ms=5000)
ipc.focus_window(two)
box = ipc.get_window_debug(two)["client_box"]
x, y = box["x"] + 80, box["y"] + 70
@@ -1011,6 +1036,7 @@ def xwayland_routing():
wait_for(lambda: rect(two)[2] > 1000, "X11 transfer reflow")
for key, top, child, path in [("2", two, client_two, log_two), ("1", one, client_one, log_one)]:
chord(key)
+ ipc.wait_for("window_geometry_settled", window_id=top, timeout_ms=5000)
box = ipc.get_window_debug(top)["client_box"]
move(box["x"] + 70, box["y"] + 80)
ipc.pointer_button(0x111, True)
@@ -1116,8 +1142,12 @@ def persistence_controls():
ipc.action("tiling_action", {"id": ids["First"], "action": "resize_split_down"})
ipc.action("set_window_gap", {"gap": 12, "persist": True})
wait_for(lambda: ipc.get_workspaces()[0]["window_gap"] == 12, "gap setting")
- time.sleep(.3)
- expected = {title: frame(id) for title, id in ids.items()}
+ def settled():
+ # Tiles glide to a new split: wait until they rest.
+ first = {title: frame(id) for title, id in ids.items()}
+ time.sleep(.2)
+ return first if first == {title: frame(id) for title, id in ids.items()} else None
+ expected = wait_for(settled, "tiles at rest")
chord("F9")
checkpoint = runtime / "layouts" / "checkpoint.toml"
wait_for(checkpoint.exists, "named workspace save")
@@ -1125,7 +1155,8 @@ def persistence_controls():
ipc.action("set_workspace_layout", {"workspace": 1, "automatic": False})
wait_for(lambda: window(ids["First"])["placement"] == "floating", "floating layout")
chord("F10")
- wait_for(lambda: all(frame(id) == expected[title] for title, id in ids.items()), "named split restore")
+ try: wait_for(lambda: all(frame(id) == expected[title] for title, id in ids.items()), "named split restore")
+ except AssertionError: raise AssertionError(("named split restore", expected, {title: frame(id) for title, id in ids.items()})) from None
# Settings uses the same setters; toggle a per-app exception.
ipc.action("open_control_center")
settings = wait_for(lambda: next((w for w in ipc.get_windows() if w["app_id"] == "rediwm-settings"), None), "Settings map")["id"]