[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-openjfx-dev
Subject:    Re: Headless glass platform
From:       Johan Vos <johan.vos () gluonhq ! com>
Date:       2024-01-31 9:24:27
Message-ID: CABxFH2EQHDuQZuZ3jQMX-nQSfqq4pkepmoGaUtR9JKwgAkz4CA () mail ! gmail ! com
[Download RAW message or body]

On Tue, Jan 30, 2024 at 5:14 PM Andy Goryachev <andy.goryachev@oracle.com>
wrote:

> Excellent development, Johan, thank you!
>
>
>
> I've asked a few questions in the ticket
> https://bugs.openjdk.org/browse/JDK-8324941
>
>
>
> I suppose I should also do it here:
>
>
>
> - How do you get information on a (virtual) screen?
> - How would one control how many virtual screens are there?
>

Good questions. This is currently hardcoded in
HeadlessApplication.staticScreen_getScreens() but that can be extended to
take input via environment variables or System properties.


> - Would there be any other way of simulating user input apart from Robot?
>

Not sure I understand the question. In theory, input with mouse etc would
be possible but then that would be sort of a duplication/rewrite of the
Robot. I'm missing the usecase for this I guess?


> - Is the graphics still accelerated?
>

Yes, the headless platform does not influence the prism settings. If will
still use the hw acceleration by default, and fall back to sw-rendering if
hw fails, or if prism.order is set to explicitly use sw rendering.


> - Are there any functional gaps between Headless and headful modes (fonts,
> rendering, etc.)?
>

Not as far as I know, as that functionality is not in Glass.

>
> Most importantly,
> - Is there a JEP/tutorial for the new mode?
>
>
>
> Thank you
>
> -andy
>
>
>
>
>
> *From: *openjfx-dev <openjfx-dev-retn@openjdk.org> on behalf of Johan Vos
> <johan.vos@gluonhq.com>
> *Date: *Tuesday, January 30, 2024 at 03:47
> *To: *openjfx-dev <openjfx-dev@openjdk.org>
> *Subject: *Headless glass platform
>
> 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
>
>
>

[Attachment #3 (text/html)]

<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" \
class="gmail_attr">On Tue, Jan 30, 2024 at 5:14 PM Andy Goryachev &lt;<a \
href="mailto:andy.goryachev@oracle.com">andy.goryachev@oracle.com</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div \
class="msg956694089381023600">





<div lang="EN-US" style="overflow-wrap: break-word;">
<div class="m_1770753551720730426WordSection1">
<p class="MsoNormal"><span style="font-size:11pt;font-family:&quot;Iosevka Fixed \
SS16&quot;">Excellent development, Johan, thank you!<u></u><u></u></span></p> <p \
class="MsoNormal"><span style="font-size:11pt;font-family:&quot;Iosevka Fixed \
SS16&quot;"><u></u>  <u></u></span></p> <p class="MsoNormal"><span \
style="font-size:11pt;font-family:&quot;Iosevka Fixed SS16&quot;">I've asked a few \
questions in the ticket <a href="https://bugs.openjdk.org/browse/JDK-8324941" \
target="_blank">https://bugs.openjdk.org/browse/JDK-8324941</a><u></u><u></u></span></p>
 <p class="MsoNormal"><span style="font-size:11pt;font-family:&quot;Iosevka Fixed \
SS16&quot;"><u></u>  <u></u></span></p> <p class="MsoNormal"><span \
style="font-size:11pt;font-family:&quot;Iosevka Fixed SS16&quot;">I suppose I should \
also do it here:<u></u><u></u></span></p> <p class="MsoNormal"><span \
style="font-size:11pt;font-family:&quot;Iosevka Fixed SS16&quot;"><u></u>  \
<u></u></span></p> <p class="MsoNormal"><span \
style="font-size:11pt;font-family:&quot;Iosevka Fixed SS16&quot;">- How do you get \
                information on a (virtual) screen?<br>
- How would one control how many virtual screens are \
there?<br></span></p></div></div></div></blockquote><div><br></div><div>Good \
questions. This is currently hardcoded in \
HeadlessApplication.staticScreen_getScreens() but that can be extended to take input \
via environment variables or System properties.</div><div>  </div><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><div class="msg956694089381023600"><div \
lang="EN-US" style="overflow-wrap: break-word;"><div \
class="m_1770753551720730426WordSection1"><p class="MsoNormal"><span \
                style="font-size:11pt;font-family:&quot;Iosevka Fixed SS16&quot;">
- Would there be any other way of simulating user input apart from \
Robot?<br></span></p></div></div></div></blockquote><div><br></div><div>Not sure I \
understand the question. In theory, input with mouse etc would be possible but then \
that would be sort of a duplication/rewrite of the Robot. I&#39;m missing the usecase \
for this I guess?</div><div>  </div><blockquote class="gmail_quote" style="margin:0px \
0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div \
class="msg956694089381023600"><div lang="EN-US" style="overflow-wrap: \
break-word;"><div class="m_1770753551720730426WordSection1"><p \
class="MsoNormal"><span style="font-size:11pt;font-family:&quot;Iosevka Fixed \
                SS16&quot;">
- Is the graphics still \
accelerated?<br></span></p></div></div></div></blockquote><div><br></div><div>Yes, \
the headless platform does not influence the prism settings. If will still use the hw \
acceleration by default, and fall back to sw-rendering if hw fails, or if prism.order \
is set to explicitly use sw rendering.</div><div>  </div><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><div class="msg956694089381023600"><div \
lang="EN-US" style="overflow-wrap: break-word;"><div \
class="m_1770753551720730426WordSection1"><p class="MsoNormal"><span \
                style="font-size:11pt;font-family:&quot;Iosevka Fixed SS16&quot;">
- Are there any functional gaps between Headless and headful modes (fonts, rendering, \
etc.)?<br></span></p></div></div></div></blockquote><div><br></div><div>Not as far as \
I know, as that functionality is not in Glass.  </div><blockquote class="gmail_quote" \
style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><div class="msg956694089381023600"><div \
lang="EN-US" style="overflow-wrap: break-word;"><div \
class="m_1770753551720730426WordSection1"><p class="MsoNormal"><span \
style="font-size:11pt;font-family:&quot;Iosevka Fixed SS16&quot;"> <br>
Most importantly,<br>
- Is there a JEP/tutorial for the new mode?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:&quot;Iosevka Fixed \
SS16&quot;"><u></u>  <u></u></span></p> <p class="MsoNormal"><span \
style="font-size:11pt;font-family:&quot;Iosevka Fixed SS16&quot;">Thank \
you<u></u><u></u></span></p> <p class="MsoNormal"><span \
style="font-size:11pt;font-family:&quot;Iosevka Fixed \
SS16&quot;">-andy<u></u><u></u></span></p> <p class="MsoNormal"><span \
style="font-size:11pt;font-family:&quot;Iosevka Fixed SS16&quot;"><u></u>  \
<u></u></span></p> <p class="MsoNormal"><span \
style="font-size:11pt;font-family:&quot;Iosevka Fixed SS16&quot;"><u></u>  \
<u></u></span></p> <div \
id="m_1770753551720730426mail-editor-reference-message-container"> <div>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt \
solid rgb(181,196,223);padding:3pt 0in 0in"> <p class="MsoNormal" \
style="margin-bottom:12pt"><b><span \
style="font-size:12pt;font-family:Aptos,sans-serif;color:black">From: \
</span></b><span style="font-size:12pt;font-family:Aptos,sans-serif;color:black">openjfx-dev \
&lt;<a href="mailto:openjfx-dev-retn@openjdk.org" \
target="_blank">openjfx-dev-retn@openjdk.org</a>&gt; on behalf of Johan Vos &lt;<a \
href="mailto:johan.vos@gluonhq.com" target="_blank">johan.vos@gluonhq.com</a>&gt;<br> \
<b>Date: </b>Tuesday, January 30, 2024 at 03:47<br> <b>To: </b>openjfx-dev &lt;<a \
href="mailto:openjfx-dev@openjdk.org" \
target="_blank">openjfx-dev@openjdk.org</a>&gt;<br> <b>Subject: </b>Headless glass \
platform<u></u><u></u></span></p> </div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11pt">Hi,<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11pt"><u></u>  <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11pt">I created a branch in the \
jfx-sandbox repository for experimenting with a headless glass platform: <a \
href="https://github.com/openjdk/jfx-sandbox/tree/johanvos-headless" \
target="_blank">https://github.com/openjdk/jfx-sandbox/tree/johanvos-headless</a><u></u><u></u></span></p>
 </div>
<div>
<p class="MsoNormal"><span style="font-size:11pt"><u></u>  <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11pt">This addresses  <a \
href="https://bugs.openjdk.org/browse/JDK-8324941" \
target="_blank">https://bugs.openjdk.org/browse/JDK-8324941</a> where I suggest a POC \
for a Headless platform.<u></u><u></u></span></p> </div>
<div>
<p class="MsoNormal"><span style="font-size:11pt"><u></u>  <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11pt">There are a number of usecases for \
this, including:<br> 1. applications that require JavaFX rendering without presenting \
this to a window (and instead send it to a printer for \
example)<u></u><u></u></span></p> </div>
<div>
<p class="MsoNormal"><span style="font-size:11pt">2. running tests without requiring \
a window manager.<u></u><u></u></span></p> </div>
<div>
<p class="MsoNormal"><span style="font-size:11pt"><u></u>  <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11pt">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.<u></u><u></u></span></p> </div>
<div>
<p class="MsoNormal"><span style="font-size:11pt"><u></u>  <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11pt">By using a first-class Headless \
glass platform instead of a Monocle subplatform, it should be easier to use by \
developers.<u></u><u></u></span></p> </div>
<div>
<p class="MsoNormal"><span style="font-size:11pt">The monocle code contains very \
platform/os specific parts, which often don&#39;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.<u></u><u></u></span></p> </div>
<div>
<p class="MsoNormal"><span style="font-size:11pt"><u></u>  <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11pt">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.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11pt"><u></u>  <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11pt">- Johan<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11pt"><u></u>  <u></u></span></p>
</div>
</div>
</div>
</div>
</div>
</div>

</div></blockquote></div></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic