feat: bypass gpu acceleration blocklist #1129

This commit is contained in:
Gabriel Saillard 2021-06-02 11:29:59 +02:00
parent 1f555a62fb
commit 9cfc2e2a56
No known key found for this signature in database
GPG Key ID: 4F615B5FE436611A
2 changed files with 5 additions and 4 deletions

View File

@ -1,4 +0,0 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.13.3
ignore: {}
patch: {}

View File

@ -58,6 +58,11 @@ const innerFontsDir = path.join(__dirname, "assets/fonts");
if (process.env.http_proxy) delete process.env.http_proxy;
if (process.env.https_proxy) delete process.env.https_proxy;
// Bypass GPU acceleration blocklist, trading a bit of stability for a great deal of performance, mostly on Linux
app.commandLine.appendSwitch("ignore-gpu-blocklist");
app.commandLine.appendSwitch("enable-gpu-rasterization");
app.commandLine.appendSwitch("enable-video-decode");
// Fix userData folder not setup on Windows
try {
fs.mkdirSync(electron.app.getPath("userData"));