RFR: 8235627: Blank stages when running JavaFX app in a macOS virtual machine
Ambarish Rapte
arapte at openjdk.java.net
Fri Dec 20 10:02:26 UTC 2019
On Tue, 10 Dec 2019 13:12:37 GMT, Frederic Thevenet <github.com+7450507+fthevenet at openjdk.org> wrote:
> https://bugs.openjdk.java.net/browse/JDK-8235627
As mentioned in the description of [JDK-8235627](https://bugs.openjdk.java.net/browse/JDK-8235627), following error is printed
CGLChoosePixelFormat error: 10002
According to the documentation at [CGL Error Codes](http://mirror.informatimago.com/next/developer.apple.com/documentation/GraphicsImaging/Conceptual/OpenGL/chap5/chapter_5_section_41.html#//apple_ref/doc/uid/TP30000136/BDJHHIDE)
10002 is kCGLBadPixelFormat, which means Invalid pixel format object.
This does not seem to be an error code that should be returned by `CGLChoosePixelFormat`.
However the doc is very old, last updated on 2002-08-01.
Irrelevant to this doc the idea of this fix looks good.
modules/javafx.graphics/src/main/native-glass/mac/GlassView3D.m line 97:
> 96: if (pix == NULL)
> 97: {
> 98: const CGLPixelFormatAttribute attributes2[] =
The change looks good.
I would suggest to print a message inside the if block, mentioning that the first attempt to create a pixel format object has failed and second attempt is being made with minimal attributes.
Also please use `CGLErrorString(err)` when printing the error message.
-------------
Changes requested by arapte (Reviewer).
PR: https://git.openjdk.java.net/jfx/pull/65
More information about the openjfx-dev
mailing list