AnotherOS

Documentation

Desktop effects

What the compositor animates, what each effect costs, and how to give time back.

System Preferences → Desktop Effects configures what the compositor animates and how much of the frame it may spend doing it. Settings land in effects.conf and the compositor picks them up within about a quarter of a second — no logout, no restart.

The frame budget, first

The compositor composites in software by default. On the slower supported machines a frame costs around 14.5 ms against the 16.7 ms a 60 Hz panel allows, which leaves roughly 2 ms of headroom.

That is why this pane is not a list of switches that only add cost. Two of its controls — menu bar vibrancy and window drop shadows — give time back, and the pane shows the compositor's live frame cost so the trade is visible rather than promised.

The readout refuses to show a stale sample. Its measuring window is 30 frames, not 30 ticks, and an idle desktop skips frames entirely — so on a machine nobody is touching, the last sample can be minutes old and describe whatever was happening when the desktop was last busy. Past a few seconds, the pane says the compositor is idle instead of showing a number that never changes.

Wobbly windows

Off by default. It is the only effect here that adds per-frame work.

Dragging a window by its title bar deforms it elastically: the body trails the pointer, the edges bow, and when you let go it rings down and settles.

This is a real spring-mass lattice, not a scripted squash. A 4×4 grid of masses is laid over the window's frame, title bar included, because the title bar is the part you are dragging. The node nearest where you grabbed is pinned; every other node keeps its position on screen, so the window moving under them is the whole input to the effect. Coupling springs between neighbours make the deformation travel — a corner pulled away drags its neighbours after it a beat later — and a weaker home spring pulls every node back toward its place in the undeformed window.

Control What it changes
Springiness How stiff the springs are, so how fast the window oscillates. Roughly a 0.73 s period at the low end, 0.31 s at the high end.
Friction How quickly the oscillation dies away. It selects a damping ratio, so it means the same thing at every springiness: the low end is bouncy with several visible overshoots, the high end settles without overshooting at all.
Wobbliness How far the window may deform, 0 to 110 pixels. Zero disables the deformation. This is also what the compositor grows its repaint rectangle by, so it is the control that bounds the effect's cost.

Defaults are springiness 38, friction 22, wobbliness 70 — about a half-second period, up to 77 px of lean, settling in about a second.

They were tighter to begin with and were loosened after being tried on real hardware: every drag reported a peak deformation exactly equal to the old cap, which meant the lattice was pinned against its clamp for the whole gesture and leaned rather than moved.

Every combination settles. The model is swept over all 4410 of them, and the slowest comes to rest in under three seconds, against a hard deadline the sweep requires to go unused.

What it deliberately does not do

  • It does not wobble on resize. A resizing window is already repainting against a stream of new sizes.
  • It does not wobble menus, the dock or the desktop. The wobble is purely a paint — nothing downstream of it knows the window is leaning, and clicks are still tested against the undeformed rectangle — so it is applied only where a few pixels of visual offset cannot become a click that lands somewhere else. A title-bar drag owns the pointer for its whole duration, so during a wobble there is nothing to mis-hit.

Animation

Control Values Notes
Minimise using Genie, Scale, None The genie is the strip warp that sucks the window's lower rows into the dock first. It warps the whole window, chrome included.
Opening and closing Scale and fade, None
Speed 25 %–400 % A multiplier on every built-in duration: minimise and restore 0.30 s, open 0.20 s, close 0.15 s.
Instant On / off Not the fast end of the speed slider — a genuinely different behaviour. A zero-length animation renders no extra frames at all, which on slow hardware is the setting that matters most.

Transparency and shadows

Control Values Notes
Menu bar vibrancy Off, Light, Normal, Strong The frosted-glass blur behind the menu bar. Off skips the blur entirely and is where nearly all the saving is. Turning it down saves very little: the blur is three passes of a sliding sum, so its cost is nearly flat in the radius. The money is in not blurring at all.
Draw window drop shadows On / off

The menu bar is also affected by System Preferences → Menu Bar → Translucent menu bar. With translucency off, the bar is painted opaque and no blur is done whatever vibrancy says — a bar you cannot see through has nothing to frost.

effects.conf

One key = value per line. Missing keys take their defaults, so deleting a key restores the default rather than freezing the last value it had.

Key Range Default
wobbly_windows 0 / 1 0
wobble_springiness 0–100 38
wobble_friction 0–100 22
wobble_amount 0–100 70
animation_speed 0 (instant), or 25–400 100
minimize_effect 0 genie, 1 scale, 2 none 0
open_close_effect 0 scale and fade, 1 none 0
menubar_vibrancy 0 off, 1 light, 2 normal, 3 strong 2
window_shadows 0 / 1 1
gpu_compositing 0 off, 1 auto, 2 force 0

Values out of range are clamped when the compositor reads them, so a hand-edited file cannot put the desktop into a state the pane could not have produced.

Every default except wobbly windows is the behaviour the desktop had before this pane existed: a machine whose owner never opens it looks and costs exactly what it did.

The compositor prints what it read, every time, whether or not the file exists.

GPU compositing

gpu_compositing decides who composes each frame.

At 0, the default, it is the CPU. At 1 (auto) or 2 (force) the compositor loads the machine's Mesa at runtime, brings up a GLES context on the GPU, and draws the scene's big layers there — the wallpaper, the desktop icons, every window's shadow, frame and content, the dock and the popups — in the same paint order and inside the same damage rectangle the CPU would use.

The menu bar and tray stay on the CPU, drawn on the frame's own pixels so the frosted blur is the same blur. Dropdowns, notification banners, the level bezel and the pointer are drawn into a transparent layer the GPU then composites. The finished damage is read back, so presenting, the cursor, screenshots and remote control are unchanged.

auto keeps the GPU only when the renderer is real hardware. On a software rasteriser it says so and stays on the CPU, which is genuinely faster there. force keeps it on any renderer.

Frames that animate — opening, closing and minimising windows, the wobble, Mission Control — plus the screen saver and the Notification Centre stay CPU frames, and the compositor prints each switch and its reason.

The key is live: the compositor changes paths as soon as the file does.

What one wobble costs

The compositor reports every run, so none of this has to be taken on trust:

fzperf: wobble frames=57 span=1076ms fps=52.0 draw avg=2.20 max=2.27 ms
        peak=77.0px run=1.09s settle=0.98s converged cachebuilds=0

draw is the per-frame band warp, peak how far the lattice actually deformed, settle how long it took to come to rest after the button came up, and converged says it got there by settling rather than by hitting the deadline. cachebuilds counts offscreen frame renders: normally one per drag however many frames it lasts, and zero when a window that was still ringing is grabbed again and its bitmap reused.