RFR: 8210547: [Linux] Uncontrolled framerate

Thiago Milczarek Sayao tsayao at openjdk.org
Sat Oct 4 13:43:59 UTC 2025


As Michael Zucchi pointed out on the mailing list, the high framerate occurs because `glXSwapBuffers() `operates asynchronously. To ensure proper synchronization, you can call `glFinish() `afterward, which blocks until the buffer swap is fully completed. However, when using `glXSwapIntervalSGI`, the swap interval setting applies globally rather than per drawable. In contrast, `glXSwapIntervalEXT` provides per-drawable control, allowing finer-grained vsync behavior.

I don't know if there are scenarios when the unlimited frame rate is needed - if so we should provide a option.

It also selects the correct visual for transparency which needs to be depth = 32 for X11.

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

Commit messages:
 - [Linux] Uncontrolled framerate

Changes: https://git.openjdk.org/jfx/pull/1929/files
  Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=1929&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8210547
  Stats: 52 lines in 4 files changed: 44 ins; 6 del; 2 mod
  Patch: https://git.openjdk.org/jfx/pull/1929.diff
  Fetch: git fetch https://git.openjdk.org/jfx.git pull/1929/head:pull/1929

PR: https://git.openjdk.org/jfx/pull/1929


More information about the openjfx-dev mailing list