RFR: 8335748: Rippling of frame on scrolling

Jayathirth D V jdv at openjdk.org
Mon Nov 24 15:23:54 UTC 2025


On Thu, 20 Nov 2025 11:37:53 GMT, Ambarish Rapte <arapte at openjdk.org> wrote:

> **Issue:** 
> With metal pipeline, frame tearing is observed when scrolling the content. Perform small fling gesture scrolls for observing the issue, the issue occurs/observed easily when scroll is coming to and end.
> 
> **Cause:**
> vsync is not enabled for metal pipeline.
> 
> **Fix:** 
> 1. Enable vsync for metal pipeline. The vsync shall be enabled by default. It can be disabled with `-Djavafx.animation.fullspeed=true`.
> 2. Synchronize the access to offline render target texture.
> 2.1 The `GlassMTLFrameBufferObject._texture` object is created and destroyed by **QuantumRenderer** thread, and
> 2.2 `GlassMTLFrameBufferObject._texture` is also accessed on **Appkit** thread through function `GlassLayerMTL.blitToScreen()`
> 2.3 NSLock is created to synchronize the acess
> 2.4 Without this synchronization, a crash could occur in scenario when JavaFX app window is moved between screens that differ in refresh rate.
> 
> **Verification:**
> 1. Test that no frame tearing is observed, when scrolling(easy to test with small fling scrolls)
> 2. Test no issue observed when moving window among screens.
> 3. General sanity testing of UI.
> 
> **Test:**
> A unit or system test is not possible for this scenario.

I don't see rippling in Ensemble8 when scrolled with this PR.
Also no issues with moving window between multiple screens.
Code change and Sanity testing looks fine.

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

Marked as reviewed by jdv (Committer).

PR Review: https://git.openjdk.org/jfx/pull/1978#pullrequestreview-3500946133


More information about the openjfx-dev mailing list