| 
									
										
										
										
											2020-03-03 13:35:05 -08:00
										 |  |  | const { app, BrowserWindow } = require('electron') | 
					
						
							| 
									
										
										
										
											2018-10-02 03:34:52 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | app.commandLine.appendSwitch('--disable-software-rasterizer') | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-03 16:43:22 -06:00
										 |  |  | app.whenReady().then(() => { | 
					
						
							| 
									
										
										
										
											2018-10-02 03:34:52 +02:00
										 |  |  |   const infoType = process.argv.pop() | 
					
						
							| 
									
										
										
										
											2020-03-03 13:35:05 -08:00
										 |  |  |   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>') | 
					
						
							| 
									
										
										
										
											2018-10-02 03:34:52 +02:00
										 |  |  | }) |