grab
Take a screenshot and encode it. Blocks until the image lands.
No timeout: pending is taken every frame and nothing clears it, and from 1.21.5 the readback arrives through a GPU fence queue that nothing clears either. So a wait that never ends means a render loop that stopped — a game that has already stopped — and the HTTP pool's threads are daemons. A timeout would only misfire on the honest slow cases, where frames are seconds apart because the world is loading.
Return
the encoded image, or null if this runtime exposes no usable takeScreenshot or has no render target yet.