summaryrefslogtreecommitdiffstats
path: root/src/test/com/jogamp/opengl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-03-25 03:29:53 +0200
committerSven Gothel <[email protected]>2012-03-25 03:29:53 +0200
commit3ed491213f8f7f05d7b9866b50d764370d8ff5f6 (patch)
tree07ea2547be486eb50db9d79a19f6e0c4dfa4dc70 /src/test/com/jogamp/opengl
parent45a42f7c7f7fce4e6c7eb495591c438bdf0170a2 (diff)
Enhance and generalize AWT Threading* implementation; Minor changes ..
Threading*: - add invoke(..) generalizing the Therading decision GLCanvas: - remove 'manual' Threading decision, simply call Threading.invoke(..) - use anonymous Runnable instances - remove drawable lock, drawable is volatile instead GLJPanel: - remove 'manual' Threading decision, simply call Threading.invoke(..) - use anonymous Runnable instances - DEBUG: Use getThreadName() prefix GLContextImpl: - Remove GLWorkerThread idle command on makeCurrent(), no holding of context in worker thread while idle. - DEBUG: Use getThreadName() prefix X11GLXContext: - DEBUG: Use getThreadName() prefix TODO: Validate whether it's OK for GLCanvas and GLJPanel to set Threading.Mode.MT as the default mode!
Diffstat (limited to 'src/test/com/jogamp/opengl')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsAWT.java18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsAWT.java
index 08c073c13..ff24979eb 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsAWT.java
@@ -41,6 +41,9 @@ import com.jogamp.opengl.test.junit.jogl.demos.gl2.Gears;
import com.jogamp.opengl.test.junit.util.UITestCase;
import com.jogamp.opengl.test.junit.util.QuitAdapter;
import java.awt.Frame;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
import java.lang.reflect.InvocationTargetException;
import org.junit.Assert;
@@ -51,7 +54,7 @@ import org.junit.Test;
public class TestGearsAWT extends UITestCase {
static GLProfile glp;
static int width, height;
- static boolean firstUIActionOnProcess = false;
+ static boolean waitForKey = false;
@BeforeClass
public static void initClass() {
@@ -63,6 +66,8 @@ public class TestGearsAWT extends UITestCase {
} else {
setTestSupported(false);
}
+ // Runtime.getRuntime().traceInstructions(true);
+ // Runtime.getRuntime().traceMethodCalls(true);
}
@AfterClass
@@ -127,10 +132,17 @@ public class TestGearsAWT extends UITestCase {
try {
duration = Integer.parseInt(args[i]);
} catch (Exception ex) { ex.printStackTrace(); }
- } else if(args[i].equals("-firstUIAction")) {
- firstUIActionOnProcess = true;
+ } else if(args[i].equals("-wait")) {
+ waitForKey = true;
}
}
+ if(waitForKey) {
+ BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
+ System.err.println("Press enter to continue");
+ try {
+ System.err.println(stdin.readLine());
+ } catch (IOException e) { }
+ }
org.junit.runner.JUnitCore.main(TestGearsAWT.class.getName());
}
}