Introduce support for no hardware acceleration

Summary: Start flipper with `--no-launcher --disable-gpu` to disable hardware acceleration

Reviewed By: passy

Differential Revision: D25994355

fbshipit-source-id: e75bb209c8e3325135a114bec1f25889187d2728
This commit is contained in:
Michel Weststrate
2021-01-22 05:28:46 -08:00
committed by Facebook GitHub Bot
parent e67ed8030d
commit 727c99b729
2 changed files with 16 additions and 0 deletions

View File

@@ -82,6 +82,12 @@ const argv = yargs
default: false,
type: 'boolean',
},
'disable-gpu': {
describe:
'Disable hardware acceleration. Corresponds to FLIPPER_DISABLE_GPU=1.',
default: false,
type: 'boolean',
},
})
.version(VERSION)
.help()
@@ -93,6 +99,11 @@ if (isFB && process.env.FLIPPER_FB === undefined) {
process.env.FLIPPER_FB = 'true';
}
if (argv['disable-gpu'] || process.env.FLIPPER_DISABLE_GPU === '1') {
console.warn('Hardware acceleration disabled');
app.disableHardwareAcceleration();
}
process.env.CONFIG = JSON.stringify(config);
// possible reference to main app window