Revert "perf(fs-player): cut CPU under WebKitGTK software compositing"

This reverts commit 77edfaa867.

Restores the full Apple Music-style lyrics visuals from PR #205 on Linux:
rAF spring scroller, per-line scale transforms, text-shadows, title glow,
album-art/play-button outer glows, mesh-blob radial gradients, and the
FS-art opacity crossfade. PR #205's author noticed the Linux codepath
lost the intended feel — the CPU tradeoff is accepted.

The trigger-ref fix from 25537f27 for the lyrics menu stays in place.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Psychotoxical
2026-04-19 18:07:13 +02:00
parent 81ed6db9d1
commit d191404f2d
3 changed files with 18 additions and 115 deletions
+5 -73
View File
@@ -3854,22 +3854,6 @@
html.no-compositing .fsr-lyrics-overlay { -webkit-mask-image: none; mask-image: none; }
html.no-compositing .fsr-lyrics-rail { will-change: auto; }
/* Apple-style FS lyrics — strip GPU-only effects.
Without compositing, transform: scale() on every line forces a per-line
software repaint on each active-line change, and the 48 px / 32 px blur
text-shadows repaint on every word tick. Replace with opacity + colour,
which are cheap text-only repaints. */
html.no-compositing .fsa-lyric-line {
transform: none;
transition: color 380ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
opacity 380ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
html.no-compositing .fsa-lyric-line.fsal-past { transform: none; }
html.no-compositing .fsa-lyric-line.fsal-active { transform: none; text-shadow: none; }
html.no-compositing .fsa-lyric-line.fsal-active .fsa-lyric-word.active {
text-shadow: none;
}
/* ── no-compositing overrides ─────────────────────────────────────────────────
Applied only when WEBKIT_DISABLE_COMPOSITING_MODE=1 is set (Arch Linux etc).
Replaces GPU-only effects (backdrop-filter, CSS filter, mask-image) with
@@ -3894,19 +3878,10 @@ html.no-compositing .fs-portrait {
}
/* Portrait wrap: replace mask-image fade with a pseudo-element overlay gradient.
pointer-events: none on wrap means the overlay never blocks clicks.
Also drop translateZ(0) — useless GPU layer hint without a compositor. */
pointer-events: none on wrap means the overlay never blocks clicks. */
html.no-compositing .fs-portrait-wrap {
-webkit-mask-image: none;
mask-image: none;
transform: none;
}
/* FS art crossfade: opacity transition compositing is GPU-cheap, software-expensive.
Snap instantly between covers; visually a hard cut, but the previous layer is
replaced before the user can really notice. */
html.no-compositing .fs-art {
transition: none;
}
html.no-compositing .fs-portrait-wrap::before {
content: '';
@@ -3924,16 +3899,12 @@ html.no-compositing .fs-portrait-wrap::before {
/* Lyrics fade overlays: gradient-only, no backdrop-filter — fine in no-compositing */
/* Mesh blobs: stop animations + flatten to a solid dark fill.
Even static, the 130 × 130 % radial-gradient with color-mix() is recomputed
on every paint, and the `transition: background 400ms` on accent change
re-rasterises the giant surface for nearly half a second per track switch.
Atmosphere is sacrificed; the dynamic accent is preserved on title /
seekbar / controls via their own var(--dynamic-fs-accent) bindings. */
/* Mesh blobs: stop animations — in software mode each frame composites surfaces
larger than the screen (blob-a is 130 × 130 % of the viewport); on high-DPI
displays this saturates the CPU and drops the player to ~10 FPS.
Static gradients are preserved; only the slow pan animation is removed. */
html.no-compositing .fs-mesh-blob {
animation: none;
background: #06060e;
transition: none;
}
/* Seekbar played bar: remove box-shadow — its width changes on every playback
@@ -3942,45 +3913,6 @@ html.no-compositing .fs-seekbar-played {
box-shadow: none;
}
/* Track title: drop the 40 px text-shadow glow — paints a giant blur on a
clamp(2868 px) font and re-rasterises whenever anything around it
redraws (cluster updates, seekbar tick, dynamic accent change). */
html.no-compositing .fs-track-title {
text-shadow: 0 2px 6px rgba(0, 0, 0, 0.65);
transition: color 200ms ease-in-out;
}
/* Album art wrap: replace the accent-coloured outer glow with a flat
shadow. The 28 px blur was repainting every accent change. */
html.no-compositing .fs-art-wrap {
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.07);
transition: none;
}
/* Play button: drop accent glow + hover filter. Keep flat dark shadow only. */
html.no-compositing .fs-btn-play {
box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
}
html.no-compositing .fs-btn-play:hover {
filter: none;
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.65);
}
/* Rail-style FS lyrics: same problems as Apple style — 28 px text-shadow
blur on every active line + every active word, plus per-line transform
scaleX. Strip them; rail still scrolls fine via the parent translateY. */
html.no-compositing .fsr-lyric-line {
transition: color 280ms ease;
transform: none;
}
html.no-compositing .fsr-lyric-line.fsrl-active {
text-shadow: none;
transform: none;
}
html.no-compositing .fsr-lyric-line.fsrl-active .fsr-lyric-word.active {
text-shadow: none;
}
/* Chat */
.chat-popup {
position: absolute;