On Tue, 16 Mar 2021 14:24:19 GMT, Johan Vos <j...@openjdk.org> wrote:

> Fix for JDK-8092439 and JDK-8092064
> Monocle currently hard-codes a single Screen, and the 
> `staticScreen_getScreens()` method will never return more than 1 Screen.
> 
> This PR introduces the possibility to deal with multiple screens, which is 
> not uncommon on embedded systems. By default, the `staticScreen_getScreens()` 
> method will still return a single screen, but the sub-platforms can now 
> return multiple screens.
> 
> The EGL subplatform will now query the low-level drivers, and if they detect 
> multiple displays, multiple `Screen` instances will be configured.
> The low-level native implementation for getting the number of physical 
> screens and there characteristics is deferred to the real low-level libraries 
> (for example, an X11 based approach can do it in a different way then a DRM 
> based approach).

Looks good. I left one comment that you might want to look at (probably for a 
follow-up issue, since it doesn't seem to be causing problems).

modules/javafx.graphics/src/main/native-glass/monocle/egl/eglBridge.c line 92:

> 90: 
> 91: JNIEXPORT jlong JNICALL Java_com_sun_glass_ui_monocle_EGLScreen_nGetHandle
> 92: (JNIEnv *env, jclass clazz, jint idx)  {

Since the JNI parameters are unused, it may not matter, but since this is an 
instance method, the second argument is a `jobject` not a `jclass`. The same 
issue applies to the rest. I see that you just copied a preexisting issue, so 
you might or might not want to fix it, or maybe just file a follow-on cleanup 
issue if you like.

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

Marked as reviewed by kcr (Lead).

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

Reply via email to