From 164db661e2688bfbc53fec3357fc6885b14ab893 Mon Sep 17 00:00:00 2001 From: Xerxes RĂ„nby Date: Wed, 4 Dec 2019 00:11:40 +0100 Subject: VC4: Only load Broadcom EGL driver when guessVCIVUsed Broadcom VC IV can be used from both console and from inside X11 When used from inside X11 rendering is done on an DispmanX overlay surface while keeping an X11 nativewindow under as input. When Broadcom VC IV is guessed only the Broadcom DispmanX EGL driver is loaded. Therefore standard TYPE_X11 EGL can not be used. --- .../com/jogamp/nativewindow/NativeWindowFactory.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/nativewindow/classes') diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowFactory.java b/src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowFactory.java index d4249d404..bedf15c7b 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowFactory.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowFactory.java @@ -174,7 +174,20 @@ public abstract class NativeWindowFactory { guessGBM(true); BcmVCArtifacts.guessVCIVUsed(true); } - + if( BcmVCArtifacts.guessVCIVUsed(false) ) { + /* Broadcom VC IV can be used from + * both console and from inside X11 + * + * When used from inside X11 + * rendering is done on an DispmanX overlay surface + * while keeping an X11 nativewindow under as input. + * + * When Broadcom VC IV is guessed + * only the Broadcom DispmanX EGL driver is loaded. + * Therefore standard TYPE_X11 EGL can not be used. + */ + return TYPE_BCM_VC_IV; + } if( guessX(false) ) { return TYPE_X11; } @@ -185,9 +198,6 @@ public abstract class NativeWindowFactory { if( guessGBM(false) ) { return TYPE_DRM_GBM; } - if( BcmVCArtifacts.guessVCIVUsed(false) ) { - return TYPE_BCM_VC_IV; - } return TYPE_X11; } } -- cgit v1.2.3