On Wed, 2 Aug 2023 04:24:37 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> 
wrote:

> Only question I have is, should updateSceneState be called in 
> QuantumToolkit.runWithRenderLock synchronization?

We probably do need to acquire the lock. All but one call to that method is 
done with the `renderLock` held. A bigger concern with the fix, though, is the 
fact that `updateSceneState` must be called on the FX Application thread. Given 
that `setPixelScaleFactors` can be called either on the EDT or on the FX 
Application thread, you will either need a different place to call 
`updateSceneState`, or else will need use a `runLater` to call it.

> And also should we move updateSceneState to 
> GlassScene.entireSceneNeedsRepaint as that changes the scene, so scene state 
> needs to be updated!!

No, definitely not. GlassScene.entireSceneNeedsRepaint is called far more often 
than updateSceneState (and not always from the FX app thread(. There are plenty 
of reasons to need to paint the entire scene without needing to update the 
scene state at the time you mark the scene as needing update.

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

PR Comment: https://git.openjdk.org/jfx/pull/1171#issuecomment-1663091978

Reply via email to