Skip to content

Commit f7a7620

Browse files
authored
chore(driver): better gpu defaults (#629)
1 parent ee6ddc2 commit f7a7620

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

packages/browserless/src/driver.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,16 @@ const defaultArgs = [
2121
'--disable-site-isolation-trials', // https://source.chromium.org/search?q=lang:cpp+symbol:kDisableSiteIsolation&ss=chromium
2222
'--disable-speech-api', // https://source.chromium.org/search?q=lang:cpp+symbol:kDisableSpeechAPI&ss=chromium
2323
'--disk-cache-size=33554432', // https://source.chromium.org/search?q=lang:cpp+symbol:kDiskCacheSize&ss=chromium
24-
`--enable-features=${['SharedArrayBuffer'].join(',')}`,
2524
'--font-render-hinting=none', // https://github.com/puppeteer/puppeteer/issues/2410#issuecomment-2886054614
2625
'--ignore-gpu-blocklist', // https://source.chromium.org/search?q=lang:cpp+symbol:kIgnoreGpuBlocklist&ss=chromium
2726
'--in-process-gpu', // https://github.com/search?q=repo%3Achromium%2Fchromium%20in-process-gpu&type=code
2827
'--no-default-browser-check', // https://source.chromium.org/search?q=lang:cpp+symbol:kNoDefaultBrowserCheck&ss=chromium
2928
'--no-pings', // https://source.chromium.org/search?q=lang:cpp+symbol:kNoPings&ss=chromium
3029
'--no-sandbox', // https://source.chromium.org/search?q=lang:cpp+symbol:kNoSandbox&ss=chromium
3130
'--no-zygote', // https://source.chromium.org/search?q=lang:cpp+symbol:kNoZygote&ss=chromium
31+
'--use-angle=swiftshader', // https://chromium.googlesource.com/chromium/src/+/main/docs/gpu/swiftshader.md
32+
'--use-gl=angle', // https://chromium.googlesource.com/chromium/src/+/main/docs/gpu/swiftshader.md
33+
`--enable-features=${['SharedArrayBuffer'].join(',')}`,
3234
`--disable-features=${[
3335
'AudioServiceOutOfProcess',
3436
'CalculateNativeWinOcclusion',

packages/screenshot/test/index.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,22 @@ test('graphics features', async t => {
3232
await getGpu(),
3333
isCI
3434
? {
35-
Canvas: 'Software only, hardware acceleration unavailable',
35+
Canvas: 'Hardware accelerated',
3636
'Direct Rendering Display Compositor': 'Disabled',
37-
Compositing: 'Software only. Hardware acceleration disabled',
37+
Compositing: 'Hardware accelerated',
3838
'Multiple Raster Threads': 'Enabled',
39-
OpenGL: 'Disabled',
40-
Rasterization: 'Software only. Hardware acceleration disabled',
39+
OpenGL: 'Enabled',
40+
Rasterization: 'Hardware accelerated',
4141
'Raw Draw': 'Disabled',
4242
'Skia Graphite': 'Disabled',
4343
TreesInViz: 'Disabled',
44-
'Video Decode': 'Software only. Hardware acceleration disabled',
44+
'Video Decode': 'Hardware accelerated',
4545
'Video Encode': 'Software only. Hardware acceleration disabled',
4646
Vulkan: 'Disabled',
47-
WebGL: 'Software only, hardware acceleration unavailable',
48-
WebGL2: 'Software only, hardware acceleration unavailable',
47+
WebGL: 'Hardware accelerated',
48+
WebGL2: 'Hardware accelerated',
4949
WebGPU: 'Disabled',
50-
WebNN: 'Software only, hardware acceleration unavailable'
50+
WebNN: 'Disabled'
5151
}
5252
: {
5353
Canvas: 'Hardware accelerated',
@@ -63,7 +63,7 @@ test('graphics features', async t => {
6363
'Video Encode': 'Hardware accelerated',
6464
WebGL: 'Hardware accelerated',
6565
WebGL2: 'Hardware accelerated',
66-
WebGPU: 'Hardware accelerated',
66+
WebGPU: 'Software only, hardware acceleration unavailable',
6767
WebNN: 'Disabled'
6868
}
6969
)

0 commit comments

Comments
 (0)