On Fri, 4 Jun 2021 12:55:36 GMT, Alexander Scherbatiy <alex...@openjdk.org> wrote:
>> 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. I agree it would be nice to have the same style in all functions, but in that case I think a `void*` is more appropriate, as that is what `EGLDisplay` is (https://www.khronos.org/registry/EGL/api/1.1/EGL/egl.h) One of the goals of `egl_ext.h` file is to stay as close as possible to the EGL specifications, avoiding the need for cast operations in the low-level implementation. Hence, it would make sense to completely get rid of the `jlong` declarations at all. It is the task of the `eglBridge.c` file to convert from Java style into EGL-style and vice versa. I am willing to change this, but then a separate issue would be more appropriate I believe. ------------- PR: https://git.openjdk.java.net/jfx/pull/527