RFR: 8324941: POC for Headless platform for JavaFX [v9]

Johan Vos jvos at openjdk.org
Fri Jul 18 08:12:58 UTC 2025


On Wed, 16 Jul 2025 01:56:21 GMT, John Hendrikx <jhendrikx at openjdk.org> wrote:

> > > The first question is: Does this have any use case beyond testing?
> > 
> > 
> > Good question, and the answer is "Yes, absolutely". One of the main drivers for this was a project where PDF prints need to be generated server-side, starting from `Node.snapShot(... WritableImage)`.
> 
> @johanvos
> 
> Did you happen to see my proposal to use the software renderer to provide a Canvas#GraphicsContext like API for writable images? Snapshot is a nice feature, but it feels like a rather roundabout way to first use the GPU to draw things, then copy it back to main memory for pixel manipulation or say PDF creation...
> 
> See here: https://www.mail-archive.com/openjfx-dev@openjdk.org/msg20618.html
> 
> I'm curious what you think of the proposal (and I'm curious if the headless platform would need to support it or interfere with it :))

I see the benefits from your proposal, and I believe it makes sense. I don't think it interferes with the headless platform, since it is more in the prism-side of things, but there is always some overlap. The Robot.getScreenCapture() is one of those methods where the implementation would depend on it.

-------------

PR Comment: https://git.openjdk.org/jfx/pull/1836#issuecomment-3088260398


More information about the openjfx-dev mailing list