Skip to content

Commit 422fa06

Browse files
EyeCantCUkenshaw
authored andcommitted
fix(allocator): Set --enable-unsafe-swiftshader with --disable-gpu
In Chromium 139+, falling back to Swiftshader will be opt in: https://chromestatus.com/feature/5166674414927872 This means that anything currently leveraging DisableGPU in chromedp will fail to fallback in the future without this flag set This is already current behavior in upstream builds of Chromium 138 This sets --enable-unsafe-swiftshader to retain existing behavior and prevent regressions in anything using chromedp Signed-off-by: RJ Sampson <rj.sampson@chainguard.dev>
1 parent c34c35f commit 422fa06

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

allocate.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,8 +491,13 @@ func Headless(a *ExecAllocator) {
491491
//
492492
// But according to this reported issue, it's still required in some cases:
493493
// - https://github.com/chromedp/chromedp/issues/904
494+
//
495+
// Chromium 139+ doesn't provide fallback to Swiftshader unless the
496+
// --enable-unsafe-swiftshader option is passed:
497+
// - https://chromestatus.com/feature/5166674414927872
494498
func DisableGPU(a *ExecAllocator) {
495499
Flag("disable-gpu", true)(a)
500+
Flag("enable-unsafe-swiftshader", true)(a)
496501
}
497502

498503
// CombinedOutput is used to set an io.Writer where stdout and stderr

0 commit comments

Comments
 (0)