autokap 1.3.12 → 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 +19 -14
  2. package/package.json +1 -1
package/dist/browser.js CHANGED
@@ -822,25 +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 Vulkan — the most stable backend Chromium supports
830
- // on Linux + NVIDIA, with hardware-accelerated rasterization and video.
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.
831
835
  const angleArg = process.platform === 'darwin' ? '--use-angle=metal'
832
836
  : process.platform === 'win32' ? '--use-angle=d3d11'
833
- : isLinuxWithGpu ? '--use-angle=vulkan'
834
- : null;
835
- // Cloud Run NVIDIA L4: explicit Vulkan + GPU rasterization opt-ins.
837
+ : null;
838
+ // Cloud Run NVIDIA L4: direct EGL + GPU rasterization + zero-copy upload.
836
839
  // `--ignore-gpu-blocklist` bypasses Chromium's hardcoded driver blocklist
837
- // (it doesn't know about Cloud Run's mounted NVIDIA driver). Skia GPU
838
- // rasterization + zero-copy texture upload are the throughput wins for
839
- // backdrop-filter, blur, and full-viewport repaints (the modal-open
840
- // scenario that defeats software rasterization at ~1 fps).
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).
841
846
  const cloudGpuArgs = isLinuxWithGpu
842
847
  ? [
843
- '--enable-features=Vulkan',
848
+ '--use-gl=egl',
844
849
  '--ignore-gpu-blocklist',
845
850
  '--enable-gpu-rasterization',
846
851
  '--enable-zero-copy',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autokap",
3
- "version": "1.3.12",
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",