Skip to content

Only show the hardware acceleration tip when acceleration is off - #24

Merged
Yoosseph merged 2 commits into
mainfrom
fix/hardware-acceleration-tip
Sep 24, 2026
Merged

Yoosseph merged 2 commits into
mainfrom
fix/hardware-acceleration-tip

Conversation

@Yoosseph

@Yoosseph Yoosseph commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

Closes #23

What changed

  • Added lib/graphics-acceleration.ts, which detects whether the browser renders WebGL on the GPU:
    • creates a WebGL context with failIfMajorPerformanceCaveat: true
    • reads the renderer name (WEBGL_debug_renderer_info) and flags software renderers (SwiftShader, llvmpipe, Microsoft Basic Render Driver, WARP, ...)
  • The performance tip is now hidden only when acceleration is confirmed on. Anything uncertain still shows it, because an unneeded reminder is harmless but a missed one leaves the viewer slow.
  • Added tests/graphics-acceleration.test.ts covering the renderer classifier and the decision logic.

Testing

  • npm run check, npm run lint, npm test
  • Manual: turn off "Use graphics acceleration when available" in Chrome, relaunch, and the tip appears; turn it back on and the tip no longer appears.

@vercel

vercel Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
pc-anatomy Ready Ready Preview Sep 24, 2026 5:38pm UTC

@Yoosseph
Yoosseph merged commit 687bb10 into main Sep 24, 2026
4 checks passed
@Yoosseph
Yoosseph deleted the fix/hardware-acceleration-tip branch September 24, 2026 17:39

This branch was successfully deployed

1 active deployment
Preview — c5bd4096 Deployed Sep 24, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hardware accelration only show if you have it disabled

1 participant