On Thu, 5 Nov 2020 02:48:17 GMT, John Neffenger 
<github.com+1413266+jgn...@openjdk.org> wrote:

>> Johan Vos has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   add one more @override to process reviewer comments
>
> modules/javafx.graphics/src/main/native-glass/monocle/egl/egl_ext.h line 42:
> 
>> 40:      jlong readSurface, jlong eglContext);
>> 41: 
>> 42: extern jboolean doEglSwapBuffers(jlong eglDisplay, jlong eglSurface);
> 
> Is there a reason for using different types for the same variables in the 
> method definitions?
> 
> * The *window handle* is `long` and `jlong`.
> * The *display handle* is `long`, `void*`, and `jlong`.
> * The others (*config*, *surface*, and *context*) are all `jlong`.

Initially, I wanted to avoid jni.h in this external file. However, since 2 of 
the functions return a boolean value, I introduced jboolean, but didn't change 
all values. 
We can still go back to the non-jni types, e.g. by having an int instead of a 
jboolean, but at this moment I think the presence of jni.h should not be a 
showstopper. 
Implementations of this interface will be (or bundled with) code that does not 
know about Java, hence I tried to avoid jni types, but in case jni.h is not 
available, the implementation can easily typedef the required types.

I made it consistent now to use jlong instead of long.

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

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

Reply via email to