diff options
author | Sven Gothel <[email protected]> | 2010-10-29 03:22:05 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-10-29 03:22:05 +0200 |
commit | be82dc62e22bbbb76acd7af889908a272bda6d09 (patch) | |
tree | a290b16bad1df8d068727f32e47adfa3f918cfa0 /src/jogl/classes/com/jogamp/opengl/impl/awt | |
parent | 99d205d0c5f047ef9a6a6e21f351abe415ed3b15 (diff) |
ThreadingImpl: AWT semantic cleanup.
Use GLProfile's AWT available status.
If mode == AWT, then the AWTThreadingPlugin must be available, else throw exception.
Made AWTThreadingPlugin's 'isOpenGLThread' compatible with 'invokeOnOpenGLThread'.
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/impl/awt')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/impl/awt/AWTThreadingPlugin.java | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/awt/AWTThreadingPlugin.java b/src/jogl/classes/com/jogamp/opengl/impl/awt/AWTThreadingPlugin.java index 07bf2f2db..a91ab785b 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/awt/AWTThreadingPlugin.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/awt/AWTThreadingPlugin.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2010 JogAmp Community. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -55,13 +56,9 @@ public class AWTThreadingPlugin implements ThreadingPlugin { public boolean isOpenGLThread() throws GLException { switch (ThreadingImpl.getMode()) { case ThreadingImpl.AWT: - if (Java2D.isOGLPipelineActive()) { - // FIXME: ideally only the QFT would be considered to be the - // "OpenGL thread", but we can not currently run all of - // JOGL's OpenGL work on that thread. See the FIXME in - // invokeOnOpenGLThread. - return (Java2D.isQueueFlusherThread() || - (ThreadingImpl.isX11() && EventQueue.isDispatchThread())); + // FIXME: See the FIXME below in 'invokeOnOpenGLThread' + if (Java2D.isOGLPipelineActive() && !ThreadingImpl.isX11()) { + return Java2D.isQueueFlusherThread(); } else { return EventQueue.isDispatchThread(); } |