Enabling hardware acceleration in electron app

Viewed 5859

I am building an app using electron and react. In that i need to conditionally enable and disable hardware acceleration of app. I can disable it as below. But I did not find any thing in electron documentation to enable it back. How can I do that?

import { app, BrowserWindow } from 'electron';
....
....
app.disableHardwareAcceleration()
1 Answers

HW acceleration is enabled by default. If you want it to be like that it must be for all the application.

Related