diff options
author | Sven Gothel <[email protected]> | 2012-10-02 17:56:20 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-10-02 17:56:20 +0200 |
commit | f7ca4df7b4e6b2acbdb941f67f6d7058db134d91 (patch) | |
tree | f7c8d2e545ee52d25e9e79dc11b09f45a45a740f | |
parent | a7ab7a722db30f2016b15f0d55d1fa165f30282e (diff) |
Fix regression of fbe331f013608eb31ff0d8675f4e4c9881c9c48b [Remove XInitThreads()]
NativeWindowFactory.getDefaultToolkitLock() is no more a global singleton,
but an instance which has to track/lock a single resource.
Hence the decoration w/ it in GLDrawableFactory is useless and applying lock/unlock
on a new instance also a bug/regression.
-rwxr-xr-x | make/scripts/tests.sh | 4 | ||||
-rw-r--r-- | src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java | 14 | ||||
-rw-r--r-- | src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsScreen.java | 6 |
3 files changed, 8 insertions, 16 deletions
diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh index 5f24ae3cc..afc145460 100755 --- a/make/scripts/tests.sh +++ b/make/scripts/tests.sh @@ -247,7 +247,7 @@ function testawtswt() { #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLProfile01NEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestShutdownCompleteNEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestInitConcurrent01NEWT $* -testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestInitConcurrent02NEWT $* +#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestInitConcurrent02NEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLContextSurfaceLockNEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLDebug00NEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLDebug01NEWT $* @@ -351,7 +351,7 @@ testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestInitConcurrent02NEWT $* # Per default (unit tests) all test are performed this way # with OSX: -XstartOnFirstThread # -#testawtswt com.jogamp.opengl.test.junit.jogl.swt.TestSWTEclipseGLCanvas01GLn $* +testawtswt com.jogamp.opengl.test.junit.jogl.swt.TestSWTEclipseGLCanvas01GLn $* #testawtswt com.jogamp.opengl.test.junit.jogl.swt.TestSWTAccessor03AWTGLn $* #testawtswt com.jogamp.opengl.test.junit.jogl.swt.TestSWTJOGLGLCanvas01GLn $* #testawtswt com.jogamp.opengl.test.junit.jogl.swt.TestNewtCanvasSWTGLn $* diff --git a/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java b/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java index 0ea565b89..deb187372 100644 --- a/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java @@ -441,24 +441,14 @@ public abstract class GLDrawableFactoryImpl extends GLDrawableFactory { @Override public GLContext createExternalGLContext() { - NativeWindowFactory.getDefaultToolkitLock().lock(); - try { - return createExternalGLContextImpl(); - } finally { - NativeWindowFactory.getDefaultToolkitLock().unlock(); - } + return createExternalGLContextImpl(); } protected abstract GLDrawable createExternalGLDrawableImpl(); @Override public GLDrawable createExternalGLDrawable() { - NativeWindowFactory.getDefaultToolkitLock().lock(); - try { - return createExternalGLDrawableImpl(); - } finally { - NativeWindowFactory.getDefaultToolkitLock().unlock(); - } + return createExternalGLDrawableImpl(); } diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsScreen.java b/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsScreen.java index fa57124fb..2ec66290a 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsScreen.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsScreen.java @@ -33,10 +33,12 @@ package com.jogamp.nativewindow.x11; -import javax.media.nativewindow.*; +import javax.media.nativewindow.AbstractGraphicsDevice; +import javax.media.nativewindow.AbstractGraphicsScreen; +import javax.media.nativewindow.DefaultGraphicsScreen; +import javax.media.nativewindow.NativeWindowException; import jogamp.nativewindow.x11.X11Lib; -import jogamp.nativewindow.x11.X11Util; /** Encapsulates a screen index on X11 platforms. Objects of this type are passed to {@link |