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.
- package/dist/browser.js +19 -14
- 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
|
|
826
|
-
//
|
|
827
|
-
//
|
|
828
|
-
//
|
|
829
|
-
//
|
|
830
|
-
//
|
|
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
|
-
:
|
|
834
|
-
|
|
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).
|
|
838
|
-
//
|
|
839
|
-
//
|
|
840
|
-
//
|
|
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
|
-
'--
|
|
848
|
+
'--use-gl=egl',
|
|
844
849
|
'--ignore-gpu-blocklist',
|
|
845
850
|
'--enable-gpu-rasterization',
|
|
846
851
|
'--enable-zero-copy',
|