electron-261: add gpu switches

for windows environments to ensure screen-sharing doesn't break with multiple monitors, we add flags to disable gpu
This commit is contained in:
Vishwas Shashidhar 2018-01-23 16:38:44 +05:30
parent c90fd8d886
commit 7f0f5f8449

View File

@ -13,7 +13,7 @@ const urlParser = require('url');
// Local Dependencies
const {getConfigField, updateUserConfigWin, updateUserConfigMac, readConfigFileSync} = require('./config.js');
const {setCheckboxValues} = require('./menus/menuTemplate.js');
const { isMac, isDevEnv } = require('./utils/misc.js');
const { isMac, isDevEnv, isWindowsOS } = require('./utils/misc.js');
const protocolHandler = require('./protocolHandler');
const getCmdLineArg = require('./utils/getCmdLineArg.js');
const log = require('./log.js');
@ -22,6 +22,15 @@ const { deleteIndexFolder } = require('./search/search.js');
require('electron-dl')();
// ELECTRON-261: On Windows, due to gpu issues, we need to disable gpu
// to ensure screen sharing works effectively with multiple monitors
// https://github.com/electron/electron/issues/4380
if (isWindowsOS) {
app.commandLine.appendSwitch("disable-gpu", true);
app.commandLine.appendSwitch("disable-gpu-compositing", true);
app.commandLine.appendSwitch("disable-d3d11", true);
}
//setting the env path child_process issue https://github.com/electron/electron/issues/7688
shellPath()
.then((path) => {