mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-11-25 02:10:32 -06:00
ELECTRON-261: add logic to get gpu related flags from config file
This commit is contained in:
parent
7f0f5f8449
commit
d3b95f70e9
@ -16,6 +16,9 @@
|
||||
},
|
||||
"customFlags": {
|
||||
"authServerWhitelist": "",
|
||||
"authNegotiateDelegateWhitelist": ""
|
||||
"authNegotiateDelegateWhitelist": "",
|
||||
"disableGpu": false,
|
||||
"disableGpuCompositing": false,
|
||||
"disableD3d11": false
|
||||
}
|
||||
}
|
25
js/main.js
25
js/main.js
@ -25,11 +25,6 @@ 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()
|
||||
@ -129,18 +124,34 @@ function setChromeFlags() {
|
||||
|
||||
log.send(logLevels.INFO, 'Chrome flags config found!');
|
||||
|
||||
// If we cannot find the authServerWhitelist config, move on
|
||||
if (config.customFlags.authServerWhitelist && config.customFlags.authServerWhitelist !== "") {
|
||||
log.send(logLevels.INFO, 'Setting auth server whitelist flag');
|
||||
app.commandLine.appendSwitch('auth-server-whitelist', config.customFlags.authServerWhitelist);
|
||||
}
|
||||
|
||||
// If we cannot find the authNegotiateDelegateWhitelist config, move on
|
||||
if (config.customFlags.authNegotiateDelegateWhitelist && config.customFlags.authNegotiateDelegateWhitelist !== "") {
|
||||
log.send(logLevels.INFO, 'Setting auth negotiate delegate whitelist flag');
|
||||
app.commandLine.appendSwitch('auth-negotiate-delegate-whitelist', config.customFlags.authNegotiateDelegateWhitelist);
|
||||
}
|
||||
|
||||
// ELECTRON-261: Windows 10 Screensharing issues. We set chrome flags
|
||||
// to disable gpu which fixes the black screen issue observed on
|
||||
// multiple monitors
|
||||
if (config.customFlags.disableGpu) {
|
||||
log.send(logLevels.INFO, 'Setting disable gpu flag');
|
||||
app.commandLine.appendSwitch("disable-gpu", true);
|
||||
}
|
||||
|
||||
if (config.customFlags.disableGpuCompositing) {
|
||||
log.send(logLevels.INFO, 'Setting disable gpu compositing flag');
|
||||
app.commandLine.appendSwitch("disable-gpu-compositing", true);
|
||||
}
|
||||
|
||||
if (config.customFlags.disableD3d11) {
|
||||
log.send(logLevels.INFO, 'Setting disable d3d11 flag');
|
||||
app.commandLine.appendSwitch("disable-d3d11", true);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user