RFR: 8268120: Allow hardware cursor to be used on Monocle-EGL platforms [v2]

Alexander Scherbatiy alexsch at openjdk.java.net
Fri Jun 4 12:57:59 UTC 2021


On Fri, 4 Jun 2021 12:42:23 GMT, Kevin Rushforth <kcr at 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


More information about the openjfx-dev mailing list