aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/awt
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-03-19 17:14:15 +0100
committerSven Gothel <[email protected]>2012-03-19 17:14:15 +0100
commitb823e8a0e18ec0b357d62af468a14162a9fb4948 (patch)
tree645c7179d85dfd1fb49b2a669d4656d772f46638 /src/jogl/classes/jogamp/opengl/awt
parent8baa72ed68481feada5f91aa868c0ae258802e29 (diff)
Fix / Cleanup AWT related Threading code: Using enums, properly disable singlethreading if requested, fix doc: -Dopengl.1thread -> -Djogl.1thread
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/awt')
-rw-r--r--src/jogl/classes/jogamp/opengl/awt/AWTThreadingPlugin.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/jogl/classes/jogamp/opengl/awt/AWTThreadingPlugin.java b/src/jogl/classes/jogamp/opengl/awt/AWTThreadingPlugin.java
index dd493f5ee..901146fc4 100644
--- a/src/jogl/classes/jogamp/opengl/awt/AWTThreadingPlugin.java
+++ b/src/jogl/classes/jogamp/opengl/awt/AWTThreadingPlugin.java
@@ -42,8 +42,6 @@ package jogamp.opengl.awt;
import javax.media.opengl.*;
-import java.awt.event.*;
-
import java.awt.EventQueue;
import java.lang.reflect.InvocationTargetException;
@@ -55,14 +53,14 @@ public class AWTThreadingPlugin implements ThreadingPlugin {
public boolean isOpenGLThread() throws GLException {
switch (ThreadingImpl.getMode()) {
- case ThreadingImpl.AWT:
+ case ST_AWT:
// FIXME: See the FIXME below in 'invokeOnOpenGLThread'
if (Java2D.isOGLPipelineActive() && !ThreadingImpl.isX11()) {
return Java2D.isQueueFlusherThread();
} else {
return EventQueue.isDispatchThread();
}
- case ThreadingImpl.WORKER:
+ case ST_WORKER:
if (Java2D.isOGLPipelineActive()) {
// FIXME: ideally only the QFT would be considered to be the
// "OpenGL thread", but we can not currently run all of
@@ -80,7 +78,7 @@ public class AWTThreadingPlugin implements ThreadingPlugin {
public void invokeOnOpenGLThread(Runnable r) throws GLException {
switch (ThreadingImpl.getMode()) {
- case ThreadingImpl.AWT:
+ case ST_AWT:
// FIXME: ideally should run all OpenGL work on the Java2D QFT
// thread when it's enabled, but unfortunately there are
// deadlock issues on X11 platforms when making our
@@ -102,7 +100,7 @@ public class AWTThreadingPlugin implements ThreadingPlugin {
}
break;
- case ThreadingImpl.WORKER:
+ case ST_WORKER:
GLWorkerThread.start(); // singleton start via volatile-dbl-checked-locking
try {
GLWorkerThread.invokeAndWait(r);