feat: Implementation of getGPUInfo API. (#13486)
* Implementation of getGPUInfo API. * Clear promise set * Changes to promise usage * Minor fixes * Fix linux build * Update spec * Fix lint (linter didn't run on windows locally) * Test running single test for CI * Update spec
This commit is contained in:
parent
638311b6b3
commit
5c108728d6
13 changed files with 529 additions and 127 deletions
|
@ -905,6 +905,41 @@ Returns [`ProcessMetric[]`](structures/process-metric.md): Array of `ProcessMetr
|
|||
|
||||
Returns [`GPUFeatureStatus`](structures/gpu-feature-status.md) - The Graphics Feature Status from `chrome://gpu/`.
|
||||
|
||||
### `app.getGPUInfo(infoType)`
|
||||
|
||||
* `infoType` String - Values can be either `basic` for basic info or `complete` for complete info.
|
||||
|
||||
Returns `Promise`
|
||||
|
||||
For `infoType` equal to `complete`:
|
||||
Promise is fulfilled with `Object` containing all the GPU Information as in [chromium's GPUInfo object](https://chromium.googlesource.com/chromium/src.git/+/66.0.3359.181/gpu/config/gpu_info.cc). This includes the version and driver information that's shown on `chrome://gpu` page.
|
||||
|
||||
For `infoType` equal to `basic`:
|
||||
Promise is fulfilled with `Object` containing fewer attributes than when requested with `complete`. Here's an example of basic response:
|
||||
```js
|
||||
{ auxAttributes:
|
||||
{ amdSwitchable: true,
|
||||
canSupportThreadedTextureMailbox: false,
|
||||
directComposition: false,
|
||||
directRendering: true,
|
||||
glResetNotificationStrategy: 0,
|
||||
inProcessGpu: true,
|
||||
initializationTime: 0,
|
||||
jpegDecodeAcceleratorSupported: false,
|
||||
optimus: false,
|
||||
passthroughCmdDecoder: false,
|
||||
sandboxed: false,
|
||||
softwareRendering: false,
|
||||
supportsOverlays: false,
|
||||
videoDecodeAcceleratorFlags: 0 },
|
||||
gpuDevice:
|
||||
[ { active: true, deviceId: 26657, vendorId: 4098 },
|
||||
{ active: false, deviceId: 3366, vendorId: 32902 } ],
|
||||
machineModelName: 'MacBookPro',
|
||||
machineModelVersion: '11.5' }
|
||||
```
|
||||
Using `basic` should be preferred if only basic information like `vendorId` or `driverId` is needed.
|
||||
|
||||
### `app.setBadgeCount(count)` _Linux_ _macOS_
|
||||
|
||||
* `count` Integer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue