Glass: design notes, perf numbers, snapSwitch test
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -18,8 +18,13 @@ design, so nothing else changes), plus one new row style:
|
||||
paints nothing and keeps the same tree shape, so a live switch never
|
||||
remounts the app.
|
||||
- `glass.rail`, `glass.pane`, `glass.detail`: the tints of the navigation
|
||||
rail, a list pane and the open item's reading pane (`ListDetailPanes`),
|
||||
strongest on the reading pane.
|
||||
rail, a list pane and the open item's reading pane (`ListDetailPanes`).
|
||||
Glass bakes the list's veil into the mesh colours (rail and pane are
|
||||
clear: no full-window blend per frame) and tints only the reading pane.
|
||||
- The mesh is drawn once into a 96px image per window shape
|
||||
(`GlassMeshPainter.meshImage`) and stretched with low filtering: one image
|
||||
draw per frame. Four full-window radial gradients per frame cost about
|
||||
twice Default's raster time on the CPU path and stalled the fixture.
|
||||
- `glass.bar`: the frosted fill of `GlassPill` (bars, composer, floating
|
||||
pieces) over its blur; `glass.solid` the opaque stand-in (high contrast,
|
||||
floating windows, find bars, the terminal, phone stack discs, the container
|
||||
@@ -39,6 +44,10 @@ design, so nothing else changes), plus one new row style:
|
||||
tint with a short rounded mark; the open row is `slab` washed 8% with the
|
||||
accent, a 1px ring at 55% and a 16px glow at `glass.glow`.
|
||||
|
||||
Glass also sets `snapSwitch` (main's token): a live switch into or out of
|
||||
Glass snaps instead of blending clear pages with an opaque design's (the
|
||||
blend stalled skwasm in the browser bench).
|
||||
|
||||
Glass keeps `transcript: bubbles`, `composer: pill`, `radius: null` (each
|
||||
widget keeps its own shape, grown), `flat: false`, and sets ANSI accents and
|
||||
a roomier reading line (`ReadingType(height: 1.55)`).
|
||||
@@ -82,6 +91,10 @@ strength, in light and dark.
|
||||
- Graph nodes keep `Card.filled` / `Card.outlined` (now with the glass edge
|
||||
and 16px corners from the card theme); the edge hover card is the inverse
|
||||
surface in grown corners.
|
||||
- Graph nodes in dark read as near-black cards (`Card.outlined` keeps the
|
||||
opaque `surface`).
|
||||
- The phone chat page keeps the workspace's opaque `surface` behind its
|
||||
panes (it backs the chat swipe motion).
|
||||
- Sticky section headings and the run detail's Input/Output strips paint the
|
||||
opaque `surface` (they hide what scrolls under them).
|
||||
- Native desktop page slides (Linux, Windows, macOS/iOS Cupertino) show the
|
||||
@@ -90,8 +103,29 @@ strength, in light and dark.
|
||||
|
||||
## Perf
|
||||
|
||||
PERF_PLACEHOLDER
|
||||
Widget budget (`test/perf/design_bench_test.dart`): passes. Glass:
|
||||
`scrollRebuildsPerRow` 93.1 (Default 83.5), `scrollLayersPerFrame` 11.0
|
||||
(11.2), `scrollSaveLayersPerFrame` 7.3 (7.4), `switchFramesPerSwitch` 4.5
|
||||
(4.5), no unrelated theme rebuilds; layers {opacity 438, clipRect 60,
|
||||
clipPath 163} vs Default {443, 60, 167}.
|
||||
|
||||
Browser (`design_bench.mjs --designs glass`, skwasm, 3 repeats, medians;
|
||||
mean build / raster ms per frame, Glass vs Default):
|
||||
|
||||
| scenario | CPU (no --gpu) | GPU (--gpu) |
|
||||
| --- | --- | --- |
|
||||
| scroll | 8.94 / 39.86 vs 8.69 / 35.84 | 1.82 / 2.50 vs 1.94 / 2.58 |
|
||||
| switch | 8.91 / 42.51 vs 8.49 / 34.95 | 2.27 / 3.49 vs 1.74 / 2.57 |
|
||||
| runs | 1.43 / 9.39 vs 1.49 / 7.63 | 1.70 / 1.53 vs 1.77 / 1.52 |
|
||||
| graph | 2.06 / 19.14 vs 2.31 / 15.79 | 1.14 / 2.15 vs 1.14 / 2.22 |
|
||||
| design | 6.78 / 20.35 vs 14.57 / 24.40 | 3.91 / 2.09 vs 10.36 / 7.72 |
|
||||
|
||||
Both PASS; heap growth over 120 live switches 0.43 MB (Default 0.63); no
|
||||
off-origin request beyond Default's own (Roboto, Noto Sans Symbols).
|
||||
|
||||
## Captures
|
||||
|
||||
CAPTURES_PLACEHOLDER
|
||||
`/tmp/glass-review/final-{light,dark}-{1440,560}/` (01 chat with tool chip,
|
||||
bubbles, code card and the composer's usage ring, 02 activity dialog, 03
|
||||
follow-up notes, 04 runs, 05 run 7, 06 run graph, 07 pipelines, 08
|
||||
settings, 09 the design picker), recipe `/tmp/glass-review/cap.sh`.
|
||||
|
||||
Reference in New Issue
Block a user