39baf68790
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com> Co-authored-by: loc <andy@slack-corp.com> Co-authored-by: Robo <hop2deep@gmail.com> Co-authored-by: Jeremy Apthorp <nornagon@nornagon.net>
21 lines
545 B
JavaScript
21 lines
545 B
JavaScript
const { app, BrowserWindow } = require('electron')
|
|
|
|
app.commandLine.appendSwitch('--disable-software-rasterizer')
|
|
|
|
app.whenReady().then(() => {
|
|
const infoType = process.argv.pop()
|
|
const w = new BrowserWindow({ show: false })
|
|
w.webContents.once('did-finish-load', () => {
|
|
app.getGPUInfo(infoType).then(
|
|
(gpuInfo) => {
|
|
console.log(JSON.stringify(gpuInfo))
|
|
app.exit(0)
|
|
},
|
|
(error) => {
|
|
console.error(error)
|
|
app.exit(1)
|
|
}
|
|
)
|
|
})
|
|
w.loadURL('data:text/html;<canvas></canvas>')
|
|
})
|