feat(terminal): add runtime renderer switch

This commit is contained in:
zhangheng
2026-06-24 15:31:58 +08:00
parent 7ee8d7bde1
commit 1334685fac
5 changed files with 171 additions and 7 deletions

View File

@@ -241,7 +241,10 @@
- 固定覆盖 `200x80``240x100` viewport支持 `--lines``--viewport``--output` 参数。
- 记录行输出耗时、rows/sec、requestAnimationFrame frame time 摘要、`window.__terminalBench` render probe。
- 截图 smoke 默认走 Playwright screenshot PNG 非空/熵检查Canvas 2D fallback 可读时额外做像素采样。
3. Canvas 2D / WebGL runtime switch
3. **Canvas 2D / WebGL runtime switch**
- `/rustui/terminal` 页面提供 WebGL / Canvas / DOM runtime 切换。
- 支持 `?renderer=webgl|canvas|dom` 初始化,便于浏览器回归和 benchmark 固定模式。
- `scripts/terminal-bench.mjs --renderer webgl|canvas|dom` 复用同一入口跑对比,并将截图按 renderer 命名。
4. 与 Canvas 2D 做 benchmark 对比,按 viewport size / output rate 自动选择 renderer。
---