On Fri, 4 Jun 2021 12:42:23 GMT, Kevin Rushforth <k...@openjdk.org> wrote:

>> modules/javafx.graphics/src/main/native-glass/monocle/egl/egl_ext.h line 39:
>> 
>>> 37: 
>>> 38: // initialize the EGL system with the specified handle
>>> 39: extern jboolean doEglInitialize(void* handle);
>> 
>> Is it possible to declare arguments as `jlong eglDisplay` here instead of 
>> `void* handle` as it is done in other methods?
>> As I see nEglInitialize() passes eglDisplay on the java side:
>> https://github.com/openjdk/jfx/blob/47700d8ef0175d4b457bb658371d2da4ec0a8181/modules/javafx.graphics/src/main/java/com/sun/glass/ui/monocle/EGLAcceleratedScreen.java#L48
>> but it needs to convert it to a ptr in the native code:
>> https://github.com/openjdk/jfx/blob/47700d8ef0175d4b457bb658371d2da4ec0a8181/modules/javafx.graphics/src/main/native-glass/monocle/egl/eglBridge.c#L46
>
> What would be the advantage of changing it? In any case, it seems unrelated 
> to this fix.

All other methods doEglChooseConfig, doEglCreateWindowSurface, 
doEglCreateContext, doEglMakeCurrent, doEglSwapBuffers use `jlong eglDisplay`. 
It would be good if all functions have the same style in function argument 
declaration.

I am wondering, was it made by purpose and `void* handle` really make sense in 
doEglInitialize function?
If no, I can change it in a separate fix.

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

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

Reply via email to