diff options
author | Sven Gothel <[email protected]> | 2012-06-28 21:22:30 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-06-28 21:22:30 +0200 |
commit | 1a91ec5c8b6fd9d9db7bc115569c369fe7b38e9b (patch) | |
tree | 9882fbf1d2cacaf04471d2ee538c97d4b238993d /make | |
parent | 53ff91470b73f2f12f0d1cf5cf800a13e46e026e (diff) |
SWT GLCanvas: Fix destroy(), Remove local concurrency hack & out-of-process locking ; Revise threading code; Proper name for SWT unit tests.
SWT GLCanvas:
- Fix destroy()
drawable.setRealized(false); is being called within dispose() method
- Remove local concurrency hack
[MT-0] The hack: 'final GLContext ctx = getContext(); a = null != ctx ? ctx.something() : 0;'
is thread safe locally, however, w/o covering the hole use case of the caller
it makes no sense to add thread safe code here - would be only an illusion.
In case any of the methods are called outside of a locked state
extra care should be added. Maybe we shall expose locking facilities to the user.
However, since the user shall stick to the GLEventListener model while utilizing
GLAutoDrawable implementations, she is safe due to the implicit locked state.
- Removing out-of-process locking
[MT-1] Claiming the recursive lock in the dispose/display/.. methods
and _then_ issuing a complex off-thread GL task could lead to deadlock.
The GL task could involve calling GLEventListener methods, which itself
could try to manipulate the GLCanvas -> deadlock.
Similar to [MT-0] we may need to either find a proper locking mechanism
or simply ignore it and reduce functionality.
TBH .. the number of scenarious of the mentioned deadlock are very limited
and exotic.
- Revise threading code
[MT-2] Besides the other MT-* remarks, the logic whether to spawn off
the GL task and determination which thread to use is too complex and redundant.
(See isRenderThread(), runInGLThread() and runInDesignatedGLThread())
- Proper name for SWT unit tests.
Reflect the semantics.
Diffstat (limited to 'make')
-rwxr-xr-x | make/scripts/tests.sh | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh index 8f4237012..7a3e74558 100755 --- a/make/scripts/tests.sh +++ b/make/scripts/tests.sh @@ -86,8 +86,8 @@ function jrun() { #D_ARGS="-Dnativewindow.debug.ToolkitLock.TraceLock -Dnativewindow.debug.X11Util.TraceDisplayLifecycle=true -Dnativewindow.debug.X11Util" #D_ARGS="-Dnativewindow.debug.X11Util -Djogl.debug.GLContext -Djogl.debug.GLDrawable -Dnewt.debug=all" #D_ARGS="-Djogl.debug.GLDrawable -Djogl.debug.GLContext" + D_ARGS="-Djogamp.common.utils.locks.Lock.timeout=3000 -Djogamp.debug.Lock -Djogl.debug.GLContext.TraceSwitch" #D_ARGS="-Djogamp.common.utils.locks.Lock.timeout=600000 -Djogamp.debug.Lock -Djogamp.debug.Lock.TraceLock" - #D_ARGS="-Djogamp.common.utils.locks.Lock.timeout=3000 -Djogamp.debug.Lock -Djogamp.debug.Lock.TraceLock" #D_ARGS="-Djogamp.common.utils.locks.Lock.timeout=600000 -Djogamp.debug.Lock -Djogamp.debug.Lock.TraceLock -Dnativewindow.debug.ToolkitLock.TraceLock" #D_ARGS="-Djogamp.common.utils.locks.Lock.timeout=600000 -Djogamp.debug.Lock -Dnativewindow.debug.X11Util" #D_ARGS="-Dnewt.debug.EDT -Djogamp.common.utils.locks.Lock.timeout=600000 -Djogl.debug.Animator -Dnewt.debug.Display -Dnewt.debug.Screen" @@ -282,16 +282,14 @@ function testawtswt() { # # swt (testswt) # -#testswt com.jogamp.opengl.test.junit.jogl.swt.TestSWT01GLn $* -#testswt com.jogamp.opengl.test.junit.jogl.swt.TestSWT02GLn $* -#testswt com.jogamp.opengl.test.junit.jogl.swt.TestSWTGLCanvas01GLn $* +#testswt com.jogamp.opengl.test.junit.jogl.swt.TestSWTEclipseGLCanvas01GLn $* +testswt com.jogamp.opengl.test.junit.jogl.swt.TestSWTJOGLGLCanvas01GLn $* #testawt com.jogamp.opengl.test.junit.jogl.swt.TestSWTAccessor02GLn $* # # awtswt (testawtswt) # -#testawt com.jogamp.opengl.test.junit.jogl.swt.TestSWTAWT01GLn $* -#testawtswt com.jogamp.opengl.test.junit.jogl.swt.TestSWTJOGLGLCanvas01GLnAWT $* +#testawt com.jogamp.opengl.test.junit.jogl.swt.TestSWTAccessor03AWTGLn $* # # newt.awt (testawt) @@ -333,7 +331,8 @@ function testawtswt() { #testawt com.jogamp.opengl.test.junit.jogl.util.texture.TestPNGTextureFromFileAWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestPNGTextureFromFileNEWT $* #testawt com.jogamp.opengl.test.junit.jogl.util.texture.TestGLReadBufferUtilTextureIOWrite01AWT $* -testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestGLReadBufferUtilTextureIOWrite01NEWT $* +#testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestGLReadBufferUtilTextureIOWrite01NEWT $* +#testawt com.jogamp.opengl.test.junit.jogl.util.texture.TestGLReadBufferUtilTextureIOWrite02AWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestGLReadBufferUtilTextureIOWrite02NEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestTextureSequence01NEWT $* #testawt com.jogamp.opengl.test.junit.jogl.util.texture.TestTextureSequence01AWT $* |