Skip to content

Commit bdf6e14

Browse files
committed
docs: note computer controls screenshots are faster for webgl
Add guidance that computer controls captureScreenshot is faster than CDP Page.captureScreenshot for animation-heavy and WebGL pages, and clarify GPU acceleration's scope: it speeds up page rendering, not CDP screenshot capture.
1 parent d248ebc commit bdf6e14

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

browsers/computer-controls.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,10 @@ kernel browsers computer move-mouse <session id> --x 500 --y 300 --smooth=false
158158

159159
Capture a full-screen PNG or a specific region.
160160

161+
<Tip>
162+
For WebGL and other animation-heavy pages, `captureScreenshot` is noticeably faster than CDP's `Page.captureScreenshot`. If you're driving a computer-use loop off screenshots, prefer computer controls. [GPU acceleration](/browsers/gpu-acceleration) gives an additional small speedup for computer controls screenshots, but does not speed up CDP screenshots.
163+
</Tip>
164+
161165
<CodeGroup>
162166
```typescript Typescript/Javascript
163167
import fs from 'fs';

browsers/gpu-acceleration.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ GPU acceleration is useful for:
4444
- Video processing and playback
4545
- Canvas-heavy applications
4646

47+
<Note>
48+
GPU acceleration speeds up page rendering, not screenshot capture. CDP's `Page.captureScreenshot` latency is unaffected by GPU. [Computer controls screenshots](/browsers/computer-controls#take-screenshots) see a small speedup with GPU enabled.
49+
</Note>
50+
4751
## Availability
4852

4953
GPU acceleration is available on [Start-Up and Enterprise plans](https://kernel.sh/pricing). Due to limited capacity during the research preview, GPU-enabled browsers may not always be available.

0 commit comments

Comments
 (0)