On Wed, 9 Jun 2021 18:22:31 GMT, Andreas Heger <github.com+85555697+andreas-he...@openjdk.org> wrote:
> The inconsistent illumination happens on Macs with retina displays only if > the 3D shape is placed in a SubScene. The light sources are located with > wrong coordinates in sub scenes and this causes a different illumination. The > wrong coordinates for the light sources come from the fact that the retina > pixel scale factors are not used in a SubScene. > > With this pull request, the retina pixel scale factors will be also used in > SubScenes and this should resolve the bug > [https://bugs.openjdk.java.net/browse/JDK-8255015](url) The fix looks good. I tested it both in isolation and with PR #334 and it works on both a retina and non-retina display. If you have time to write an automated test, that would be useful, but if not then a manual test would be OK. modules/javafx.graphics/src/main/java/com/sun/javafx/sg/prism/NGSubScene.java line 211: > 209: // The pixel scale factors must be set to the rttGraphics, > otherwise the position > 210: // of the lights will not be scaled correctly on retina > displays > 211: // See https://bugs.openjdk.java.net/browse/JDK-8255015 We typically don't put pointers to bug IDs in the code (we used to, and still sometimes do in some special cases, but here it isn't needed). ------------- PR: https://git.openjdk.java.net/jfx/pull/531