Skip to content

Commit

Permalink
fix(Launcher): skip --disable-gpu flag on linux and mac platforms
Browse files Browse the repository at this point in the history
Disabling GPU is no longer necessary on these platforms given the Chromium version installed by
puppeteer.
  • Loading branch information
stephenash committed Nov 2, 2017
1 parent fede264 commit 73387fd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Launcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,14 @@ class Launcher {
if (typeof options.headless !== 'boolean' || options.headless) {
chromeArguments.push(
'--headless',
'--disable-gpu',
'--hide-scrollbars',
'--mute-audio'
);

// Do not add `--disable-gpu` for linux or macOS platforms when running headless.
// https://bugs.chromium.org/p/chromium/issues/detail?id=737678#c1
if (process.platform !== 'linux' && process.platform !== 'darwin')
chromeArguments.push('--disable-gpu');
}
let chromeExecutable = options.executablePath;
if (typeof chromeExecutable !== 'string') {
Expand Down

0 comments on commit 73387fd

Please sign in to comment.