From b8da462e7344bb70695871913cd6215bcd302544 Mon Sep 17 00:00:00 2001 From: Wayback Archiver <66856220+waybackarchiver@users.noreply.github.com> Date: Wed, 14 Feb 2024 07:35:40 +0000 Subject: [PATCH] Add flag to reduce resouces consume --- screenshot.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/screenshot.go b/screenshot.go index 831cb08..db41839 100644 --- a/screenshot.go +++ b/screenshot.go @@ -135,6 +135,8 @@ func Screenshot[T As](ctx context.Context, input *url.URL, options ...Screenshot chromedp.DefaultExecAllocatorOptions[:], // chromedp.CombinedOutput(log.Writer()), chromedp.NoDefaultBrowserCheck, + chromedp.Flag("use-gl", "angle"), + chromedp.Flag("use-angle", "swiftshader"), chromedp.Flag("ignore-certificate-errors", true), chromedp.Flag("allow-running-insecure-content", true), chromedp.Flag("no-default-browser-check", true),