(opts: {
allowedBundleIds: string[]
preferredDisplayId?: number
autoResolve: boolean
doHide?: boolean
})
| 366 | }, |
| 367 | |
| 368 | async resolvePrepareCapture(opts: { |
| 369 | allowedBundleIds: string[] |
| 370 | preferredDisplayId?: number |
| 371 | autoResolve: boolean |
| 372 | doHide?: boolean |
| 373 | }): Promise<ResolvePrepareCaptureResult> { |
| 374 | const d = cu.display.getSize(opts.preferredDisplayId) |
| 375 | const [targetW, targetH] = computeTargetDims( |
| 376 | d.width, |
| 377 | d.height, |
| 378 | d.scaleFactor, |
| 379 | ) |
| 380 | return drainRunLoop(() => |
| 381 | cu.resolvePrepareCapture( |
| 382 | withoutTerminal(opts.allowedBundleIds), |
| 383 | surrogateHost, |
| 384 | SCREENSHOT_JPEG_QUALITY, |
| 385 | targetW, |
| 386 | targetH, |
| 387 | opts.preferredDisplayId, |
| 388 | opts.autoResolve, |
| 389 | opts.doHide, |
| 390 | ), |
| 391 | ) |
| 392 | }, |
| 393 | |
| 394 | /** |
| 395 | * Pre-size to `targetImageSize` output so the API transcoder's early-return |
nothing calls this directly
no test coverage detected