aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-12-28 14:10:14 +0100
committerSven Gothel <[email protected]>2012-12-28 14:10:14 +0100
commitd93c5d23e304ea20e868595748f92a5bef4f5703 (patch)
treec3c6f8d5c8a16e56e7aa22d70dc808a7d4e4e3db /src/jogl/classes/jogamp/opengl
parentf514582845efaf2bf41cbcbeb1e2378d224b11a3 (diff)
AWT GLCanvas: More strict GLDrawable realization [on AWT-EDT], skip if creation is not possible on AWT-EDT.
The Intel HD3000 OpenGL driver on Windows will deadlock @ SwapBuffers in case the drawable is created on a thread other than the window owner thread. We are aware of such possibilities, nevertheless the AWTEDTExecutor.singleton.invoke(..) allowed to execute the runnable in case it cannot be invoked on AWT-EDT. The latter is the case if the current thread is not the AWT-EDT _and_ is holding the AWT tree-lock. With GlueGen commit 0b43b43f889ad7fc220942b0076e2001ca3cf13f, the invoke method now consumes an argument allowing to restrict the execution to AWT-EDT only. In such case, the drawable will be realized at a later time from the AWT-EDT. Such a situation could be triggered if a Frame's setVisible(true) is not issued from the AWT-EDT, as it should be! However, to relax such use cases - we better recognize such possible dealock and avoid it.
Diffstat (limited to 'src/jogl/classes/jogamp/opengl')
-rw-r--r--src/jogl/classes/jogamp/opengl/GLDrawableImpl.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java b/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java
index 2d062eaf1..c0c28a5f2 100644
--- a/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java
@@ -166,6 +166,7 @@ public abstract class GLDrawableImpl implements GLDrawable {
if ( realized != realizedArg ) { // volatile: OK (locked below)
if(DEBUG) {
System.err.println(getThreadName() + ": setRealized: "+getClass().getSimpleName()+" "+realized+" -> "+realizedArg);
+ Thread.dumpStack();
}
AbstractGraphicsDevice aDevice = surface.getGraphicsConfiguration().getScreen().getDevice();
if(realizedArg) {