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:
committed by
Facebook GitHub Bot
parent
e67ed8030d
commit
727c99b729
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user