diff options
author | 2018-03-28 15:12:14 +0200 | |
---|---|---|
committer | 2018-03-28 15:12:14 +0200 | |
commit | 199f6763c946a044a28077cf8aa131f29af83868 (patch) | |
tree | 6743fae240e7b36cd68789267ca23877f3ac6f0a /src/index.js | |
parent | mini cleanup (diff) | |
download | ferdium-app-199f6763c946a044a28077cf8aa131f29af83868.tar.gz ferdium-app-199f6763c946a044a28077cf8aa131f29af83868.tar.zst ferdium-app-199f6763c946a044a28077cf8aa131f29af83868.zip |
feature(App): Add option to disable GPU acceleration
Diffstat (limited to 'src/index.js')
-rw-r--r-- | src/index.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/index.js b/src/index.js index 897943a85..5ba901b89 100644 --- a/src/index.js +++ b/src/index.js | |||
@@ -12,6 +12,8 @@ import handleDeepLink from './electron/deepLinking'; | |||
12 | import { appId } from './package.json'; // eslint-disable-line import/no-unresolved | 12 | import { appId } from './package.json'; // eslint-disable-line import/no-unresolved |
13 | import './electron/exception'; | 13 | import './electron/exception'; |
14 | 14 | ||
15 | const debug = require('debug')('App'); | ||
16 | |||
15 | // Keep a global reference of the window object, if you don't, the window will | 17 | // Keep a global reference of the window object, if you don't, the window will |
16 | // be closed automatically when the JavaScript object is garbage collected. | 18 | // be closed automatically when the JavaScript object is garbage collected. |
17 | let mainWindow; | 19 | let mainWindow; |
@@ -57,6 +59,12 @@ if (isLinux && ['Pantheon', 'Unity:Unity7'].indexOf(process.env.XDG_CURRENT_DESK | |||
57 | // Initialize Settings | 59 | // Initialize Settings |
58 | const settings = new Settings(); | 60 | const settings = new Settings(); |
59 | 61 | ||
62 | // Disable GPU acceleration | ||
63 | if (!settings.get('enableGPUAcceleration')) { | ||
64 | debug('Disable GPU Acceleration'); | ||
65 | app.disableHardwareAcceleration(); | ||
66 | } | ||
67 | |||
60 | const createWindow = () => { | 68 | const createWindow = () => { |
61 | // Remember window size | 69 | // Remember window size |
62 | const mainWindowState = windowStateKeeper({ | 70 | const mainWindowState = windowStateKeeper({ |