RFR: 8235627: Blank stages when running JavaFX app in a macOS virtual machine

Ambarish Rapte arapte at openjdk.java.net
Fri Dec 20 13:36:24 UTC 2019


On Fri, 20 Dec 2019 10:23:36 GMT, Frederic Thevenet <github.com+7450507+fthevenet at openjdk.org> wrote:

>> Additionally the if condition at line 105 can be changed to match with the change. as,
>> `if (pix == NULL || err != kCGLNoError)`
> 
> Could you please be more specific on why you suggest the check be expended with  `|| err != kCGLNoError`?
> I see no harm in adding it but it feels like an unnecessary condition to me; my understanding of the current [documentation](https://developer.apple.com/library/archive/documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/opengl_pixelformats/opengl_pixelformats.html) (though the use of the API itself is deprecated by Apple) has me understand than `pix == NULL` is both a necessary and sufficient test.

>From the documentation, the check `pix == NULL` seems sufficient, but the `err != kCGLNoError` was used before, so I just want to keep it safe. If the issue occurs without error getting printed it will be difficult to trace. As you observed the OpenGL is deprecated, so suspecting documentation may not be up to date. Also this [doc](https://developer.apple.com/library/mac/documentation/GraphicsImaging/Reference/CGL_OpenGL/#//apple_ref/c/func/CGLChoosePixelFormat) was referred for fixing  [JDK-8154148](https://bugs.openjdk.java.net/browse/JDK-8154148), and is no longer available.
However I can't find any documentation to support this `err != kCGLNoError` check.

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

PR: https://git.openjdk.java.net/jfx/pull/65


More information about the openjfx-dev mailing list