On Tue, 30 Dec 2025 23:01:55 GMT, notzed <[email protected]> wrote:

>> As discussed on the mailing list.
>> 
>> OpenGL requires an explicit glFinish() to synchronise with the video 
>> refresh.  The current usage is incorrect and against the specification.  
>> This patch calls glFinish() after all windows have been drawn following a 
>> pulse.
>
> notzed has updated the pull request incrementally with one additional commit 
> since the last revision:
> 
>   Merge part of #1929, call glXSwapIntervalEXT in preference to 
> glXSwapIntervalSGI if available.

Change looks good to me and it now works as expected on my old Intel laptop 
(framerate is properly capped without `-Dquantum.multithreaded=false`). I have 
one more comment suggestion before approving this while I run some additional 
tests in the meantime.

modules/javafx.graphics/src/main/java/com/sun/prism/es2/ES2SwapChain.java line 
193:

> 191:         boolean presented = present();
> 192: 
> 193:         if (vsync)

I would add a comment here describing the reason for this addition so we have 
it for future reference - something along the lines of glFinish needing to be 
called only on the last presented Stage in order to properly synchronize them 
all to VSync.

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

Marked as reviewed by lkostyra (Reviewer).

PR Review: https://git.openjdk.org/jfx/pull/1981#pullrequestreview-3671299072
PR Review Comment: https://git.openjdk.org/jfx/pull/1981#discussion_r2698860645

Reply via email to