From ecc6794670b31d859763eb363ed3ead15d757977 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 16 Sep 2019 12:10:23 +0200 Subject: Bug 1393: Adding test cases setting visibility before enabling exclusive context thread animator MacOS Java11 freezes occur on 3rd NEWT window creation (orderFront) after enabling exclusive context thread animator. Here we add set visibility upfront which does not trigger the freeze on the AppKit main thread. Note: OpenJDK8 works flawlessly. For some reason, the exclusive context thread enabled animator interferes when 'orderFront' is issued. --- .../jogl/acore/ect/ExclusiveContextBase00.java | 96 ++++++++++++++++++---- 1 file changed, 78 insertions(+), 18 deletions(-) (limited to 'src/test/com') diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/ect/ExclusiveContextBase00.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/ect/ExclusiveContextBase00.java index f1219844b..fca967ea4 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/ect/ExclusiveContextBase00.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/ect/ExclusiveContextBase00.java @@ -99,7 +99,7 @@ public abstract class ExclusiveContextBase00 extends UITestCase { protected abstract void setGLAutoDrawableVisible(GLAutoDrawable[] glads); protected abstract void destroyGLAutoDrawableVisible(GLAutoDrawable glad); - protected void runTestGL(final GLCapabilitiesImmutable caps, final int drawableCount, final boolean exclusive, final boolean preAdd, final boolean shortenTest) throws InterruptedException { + protected void runTestGL(final GLCapabilitiesImmutable caps, final int drawableCount, final boolean exclusive, final boolean preAdd, final boolean preVisible, final boolean shortenTest) throws InterruptedException { final boolean useAWTRenderThread = isAWTTestCase(); if( useAWTRenderThread && exclusive ) { if( testExclusiveWithAWT ) { @@ -129,6 +129,9 @@ public abstract class ExclusiveContextBase00 extends UITestCase { demo.setVerbose(false); drawables[i].addGLEventListener(demo); } + if( preVisible ) { + setGLAutoDrawableVisible(drawables); + } if( preAdd ) { for(int i=0; i