Retro CRT: snap live switches (a blended text glow hung skwasm)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-04 01:03:17 +00:00
parent 09bafca21c
commit 6234532c59
2 changed files with 17 additions and 4 deletions
+11 -3
View File
@@ -80,7 +80,14 @@ device in light mode still gets a light page.
Retro CRT also sets: `radius: 0`, `flat`, `frame: outlineVariant`, `panel:
surfaceContainerLow`, `ansi` (brightness steps above), `transcript: prompt`,
`selectedRow: framed`, the default `pill` composer and `>` prompt glyph.
`selectedRow: framed`, the default `pill` composer and `>` prompt glyph, and
`snapSwitch: true` (High contrast's token): a live switch into or out of
Retro CRT snaps instead of blending. Blending the glow lerps every text
shadow through a near-zero blur, and in the browser bench's `design`
scenario (rapid live switches) skwasm then threw "memory access out of
bounds" in paragraph layout and the page stopped answering. An experiment
build without the glow passed the same scenario; with the snap it passes
with the glow.
## Terminal reuse
@@ -122,7 +129,8 @@ the brightness. `terminalTextTheme` takes the optional glow.
- `test/ui/theme/design_screen_overlay_test.dart`: the pattern is one
boundary, adds no saveLayer, is not repainted while content scrolls, lets
pointers through, and a design switch does not remount the app.
- `test/ui/theme/compact_switch_test.dart` switches live into and out of
both entries frame by frame.
- `test/ui/theme/compact_switch_test.dart` and
`high_contrast_switch_test.dart` switch live into and out of both entries
frame by frame.
- `test/perf/design_bench_test.dart` picks up both entries; see the report
for the browser bench.
@@ -255,7 +255,12 @@ void main() {
expect(tokens.largeTargets, isFalse, reason: design.id);
expect(tokens.minContrast, isNull, reason: design.id);
expect(tokens.windowRadius, isNull, reason: design.id);
expect(tokens.snapSwitch, isFalse, reason: design.id);
// Retro CRT snaps too: a blended text glow hung skwasm.
expect(
tokens.snapSwitch,
design.crtPhosphor != null,
reason: design.id,
);
expect(tokens.transcript, isNot(TranscriptStyle.boxed));
expect(tokens.selectedRow, isNot(SelectedRowStyle.inverted));
final frame = tokens.frame;