autokap 1.3.13 → 1.3.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/browser.js +20 -18
  2. package/package.json +1 -1
package/dist/browser.js CHANGED
@@ -822,28 +822,30 @@ export class Browser {
822
822
  const baseArgs = (process.platform === 'linux' && !isLinuxWithGpu)
823
823
  ? CHROMIUM_ARGS
824
824
  : CHROMIUM_ARGS.filter(arg => arg !== '--disable-gpu' && arg !== '--disable-gpu-sandbox');
825
- // Pin ANGLE to the platform's native graphics API. Chrome's default
826
- // backend is OpenGL on macOS, which is far slower than Metal for the
827
- // compositor (measured 4 FPS vs 32 FPS at 2880×1800 on a heavy React UI).
828
- // Same story on Windows where D3D11 is the native fast path. Cloud Run
829
- // L4 routes through ANGLE→OpenGL using NVIDIA's libGL/libEGL (mounted at
830
- // /usr/local/nvidia/lib64). We tried `--use-angle=vulkan` first but
831
- // Cloud Run does not bind-mount the NVIDIA Vulkan ICD, so vulkaninfo
832
- // resolves to llvmpipe (software fallback). The OpenGL path goes through
833
- // the EGL/GLX libs that ARE mounted, hitting the L4 directly.
825
+ // Pin GPU backend to each platform's native graphics API:
826
+ // - macOS: Metal (compositor 4→32 fps boost at 2880×1800 vs OpenGL).
827
+ // - Windows: D3D11.
828
+ // - Cloud Run Linux: direct EGL via NVIDIA libEGL_nvidia.so (mounted at
829
+ // /usr/local/nvidia/lib64). Two paths failed before: `--use-angle=vulkan`
830
+ // fell back to llvmpipe because Cloud Run does not bind-mount the
831
+ // NVIDIA Vulkan ICD; `--use-angle=gl` is not a valid ANGLE backend
832
+ // on Linux (ANGLE Linux only ships `vulkan` and `swiftshader`), so
833
+ // Chromium silently fell back to swiftshader. `--use-gl=egl` skips
834
+ // ANGLE entirely and binds to NVIDIA's EGL implementation directly.
834
835
  const angleArg = process.platform === 'darwin' ? '--use-angle=metal'
835
836
  : process.platform === 'win32' ? '--use-angle=d3d11'
836
- : isLinuxWithGpu ? '--use-angle=gl'
837
- : null;
838
- // Cloud Run NVIDIA L4: GPU rasterization + zero-copy upload via the GL
839
- // backend. `--ignore-gpu-blocklist` bypasses Chromium's hardcoded driver
840
- // blocklist (it doesn't know about Cloud Run's mounted NVIDIA driver).
841
- // These flags target the throughput wins for backdrop-filter, blur, and
842
- // full-viewport repaints the modal-open scenario that defeats software
843
- // rasterization at ~1 fps.
837
+ : null;
838
+ // Cloud Run NVIDIA L4: direct EGL + GPU rasterization + zero-copy upload.
839
+ // `--ignore-gpu-blocklist` bypasses Chromium's hardcoded driver blocklist
840
+ // (it doesn't know about Cloud Run's mounted NVIDIA driver). These flags
841
+ // target the throughput wins for backdrop-filter, blur, and full-viewport
842
+ // repaints the modal-open scenario that defeated software rasterization
843
+ // at ~1 fps. `--enable-features=Vulkan` deliberately omitted: there is no
844
+ // NVIDIA Vulkan ICD in the container, and forcing Vulkan reroutes back to
845
+ // llvmpipe (software).
844
846
  const cloudGpuArgs = isLinuxWithGpu
845
847
  ? [
846
- '--use-gl=angle',
848
+ '--use-gl=egl',
847
849
  '--ignore-gpu-blocklist',
848
850
  '--enable-gpu-rasterization',
849
851
  '--enable-zero-copy',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autokap",
3
- "version": "1.3.13",
3
+ "version": "1.3.14",
4
4
  "description": "AI-powered CLI tool for capturing clean screenshots of websites",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",