Hi Sean, On Tue, Jan 30, 2024 at 5:09 PM Sean M Phillips <sean.mi.phill...@gmail.com> wrote:
> This is very cool Johan. I have some questions if you have time to answer: > > Do you believe your headless platform POC would allow the use of the > snapshot method for exporting visuals of a scene to a png? > Yes, that is one of the usecases indeed. I tested it with a print job, and that worked. So snapshots should work too. > If so do you have any early indications of performance therein? (number of > snapshots per second etc) > I don't, but keep in mind that the headless platform is only a replacement in Glass. The rendering part is done in Prism. The headless platform does not interfere with that. So if the performance of your application is rendering-bounded, I expect it to be the same. However, since you don't need a window system with the headless platform, it's easier to run applications on headless cloud instances, for example. > Will the headless platform support the 3D Nodes/Camera etc? > Yes, that is outside the Glass platform. > > Thank you for your work and your time answering in advance. > > Sean > > On Tue, Jan 30, 2024 at 6:47 AM Johan Vos <johan....@gluonhq.com> wrote: > >> Hi, >> >> I created a branch in the jfx-sandbox repository for experimenting with a >> headless glass platform: >> https://github.com/openjdk/jfx-sandbox/tree/johanvos-headless >> >> This addresses https://bugs.openjdk.org/browse/JDK-8324941 where I >> suggest a POC for a Headless platform. >> >> There are a number of usecases for this, including: >> 1. applications that require JavaFX rendering without presenting this to >> a window (and instead send it to a printer for example) >> 2. running tests without requiring a window manager. >> >> Regarding the second usecase, we already did some basic experiments using >> a modified version of TestFX where instead of the Monocle Headless >> subplatform, the POC Headless platform is used. >> >> By using a first-class Headless glass platform instead of a Monocle >> subplatform, it should be easier to use by developers. >> The monocle code contains very platform/os specific parts, which often >> don't make sense outside the target platform. This is very valuable, but it >> is also a very different usecase than a headless platform and it requires a >> much more complex build procedure. >> >> I added an initial, limited HeadlessRobot to do some basic tests. That >> code is mainly taken from the existing Monocle implementation, but I want >> to be careful to avoid anything that is not applicable to the headless >> scenarios. >> >> - Johan >> >>