From be82dc62e22bbbb76acd7af889908a272bda6d09 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 29 Oct 2010 03:22:05 +0200 Subject: 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'. --- .../com/jogamp/opengl/impl/awt/AWTThreadingPlugin.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/jogl/classes/com/jogamp/opengl/impl/awt') 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(); } -- cgit v1.2.3