JDK-8210547[linux] frame pacing etc.
Michael Zucchi
notzed at gmail.com
Tue Oct 7 05:47:05 UTC 2025
On 4/10/25 01:20, Thiago Milczarek Sayão wrote:
> Just out of curiosity, I compiled the EGL version. Here:
> https://github.com/tsayao/jfx/releases/tag/test-egl
>
> It does seem to have a difference in frame rate.
>
That's a lot better, it's basically the same as if I remove the
makeCurrent() from ES2Pipeline.present and I presume how it behaves on
other systems. I still think it's throttling in the wrong place and the
GlassTimer is terrible, but at least it's throttling. I'll probably
try 25 with the latest mesa and if i still see it file a bug with them.
Over the last few days I did a lot of analysis with a more complex
application - one that calculates an image sequence via OpenCL and
displays it in JavaFX. The OpenCL takes from about 3 to 15ms to
complete depending on the scene. I've attached some inter-pulse timing
plots which are a bit more interesting than the previous ones.
There's JavaFX 25, my patches (Z), and the with your EGL build (I also
tested with the makeCurrent() change since it's a single window, and it
matches the EGL one).
From left to right, top to bottom:
1. Transition with no frame-rate, asynchronous rendering that drops
work if a new request comes in while it's busy.
2. Transition with 60f/s desired frame rate, asynchronous rendering as 1.
3. Transition with no frame-rate, synchronous rendering on the
animation thread.
4. Transition with 60/s desired frame rate, synchronous rendering as 3.
Setting a desired frame rate on the Transition results in considerable
microstutter even with the egl version. Not setting a desired frame
rate - visually it's ok but there is still more frame pacing variation
than calling glFinish() after all scenes have been drawn and with a more
accurate timer.
I want to try to do some latency testing if I can work out a reasonable
way to do it.
For what it's worth i've also attached current patch-in-progress that
includes a more accurate if rather simple timer.
Regards,
!Z
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20251007/79ba0221/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mand_jfx_25.png
Type: image/png
Size: 14638 bytes
Desc: not available
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20251007/79ba0221/mand_jfx_25-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mand_jfx_z.png
Type: image/png
Size: 13599 bytes
Desc: not available
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20251007/79ba0221/mand_jfx_z-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mand_jfx_egl.png
Type: image/png
Size: 14651 bytes
Desc: not available
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20251007/79ba0221/mand_jfx_egl-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: javafx-vsync-timer.diff
Type: text/x-patch
Size: 14572 bytes
Desc: not available
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20251007/79ba0221/javafx-vsync-timer-0001.diff>
More information about the openjfx-dev
mailing list