diff options
author | Sven Gothel <[email protected]> | 2013-11-08 15:51:57 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-11-08 15:51:57 +0100 |
commit | d896598b0b0c79511b3a00b65467cad2aad41694 (patch) | |
tree | 4d2c2e10ec6a9980e169cf0bf9e008f26506560c | |
parent | 8f1373e15eef1fb8bd00dfe500a2eddc71a74d7e (diff) |
TestPerf001GLJPanelInit02AWT: Add overlapping test ..
-rw-r--r-- | make/scripts/tests.sh | 4 | ||||
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/jogl/perf/TestPerf001GLJPanelInit02AWT.java | 42 |
2 files changed, 40 insertions, 6 deletions
diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh index 5a56a1ee4..809099a82 100644 --- a/make/scripts/tests.sh +++ b/make/scripts/tests.sh @@ -337,7 +337,7 @@ function testawtswt() { # #testnoawt com.jogamp.opengl.test.junit.jogl.perf.TestPerf001RawInit00NEWT $* #testawt com.jogamp.opengl.test.junit.jogl.perf.TestPerf001GLJPanelInit01AWT $* -#testawt com.jogamp.opengl.test.junit.jogl.perf.TestPerf001GLJPanelInit02AWT $* +testawt com.jogamp.opengl.test.junit.jogl.perf.TestPerf001GLJPanelInit02AWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.perf.TestPerf001GLWindowInit03NEWT $* # @@ -483,7 +483,7 @@ function testawtswt() { #testawt com.jogamp.opengl.test.junit.jogl.acore.TestPBufferDeadlockAWT $* #testawt com.jogamp.opengl.test.junit.jogl.acore.TestShutdownCompleteAWT $* #testawt com.jogamp.opengl.test.junit.jogl.acore.x11.TestGLXCallsOnAWT $* -testawt com.jogamp.opengl.test.junit.jogl.awt.Bug898AnimatorFromEDTAWT $* +#testawt com.jogamp.opengl.test.junit.jogl.awt.Bug898AnimatorFromEDTAWT $* #testawt com.jogamp.opengl.test.junit.jogl.awt.TestBug816OSXCALayerPos01AWT $* #testawt com.jogamp.opengl.test.junit.jogl.awt.TestBug816OSXCALayerPos02AWT $* #testawt com.jogamp.opengl.test.junit.jogl.awt.TestBug816OSXCALayerPos03aB729AWT $* diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/perf/TestPerf001GLJPanelInit02AWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/perf/TestPerf001GLJPanelInit02AWT.java index 1c3accb67..38ed349b1 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/perf/TestPerf001GLJPanelInit02AWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/perf/TestPerf001GLJPanelInit02AWT.java @@ -70,12 +70,19 @@ public class TestPerf001GLJPanelInit02AWT extends UITestCase { } public void test(final GLCapabilitiesImmutable caps, final boolean useGears, final int width, final int height, - final int frameCount, final boolean initMT, final boolean useGLJPanel, final boolean useGLCanvas, final boolean useAnim, final boolean overlap) { + final int frameCount, final boolean initMT, final boolean useGLJPanel, final boolean useGLCanvas, + final boolean useAnim, final boolean overlap) { final GLAnimatorControl animator = useAnim ? new Animator() : null; final int cols = (int)Math.round(Math.sqrt(frameCount)); final int rows = frameCount / cols; - final int eWidth = width/cols-32; - final int eHeight = height/rows-32; + final int eWidth, eHeight; + if( overlap ) { + eWidth = width; + eHeight = height; + } else { + eWidth = width/cols-32; + eHeight = height/rows-32; + } final JFrame[] frame = new JFrame[frameCount]; final long[] t = new long[10]; @@ -262,6 +269,30 @@ public class TestPerf001GLJPanelInit02AWT extends UITestCase { false /* useGLCanvas */, false /*useAnim*/, false /* overlap */); } + @Test + public void test10NopNoGLDefOverlap() throws InterruptedException, InvocationTargetException { + test(null, false /*useGears*/, width, height , frameCount, false /* initMT */, false /* useGLJPanel */, + false /* useGLCanvas */, false /*useAnim*/, true /* overlap */); + } + + @Test + public void test11NopGLCanvasDefOverlap() throws InterruptedException, InvocationTargetException { + test(new GLCapabilities(null), false /*useGears*/, width, height , frameCount, false /* initMT */, false /* useGLJPanel */, + true /* useGLCanvas */, false /*useAnim*/, true /* overlap */); + } + + @Test + public void test12NopGLJPanelDefOverlapSingle() throws InterruptedException, InvocationTargetException { + test(new GLCapabilities(null), false /*useGears*/, width, height , frameCount, false /* initMT */, true /* useGLJPanel */, + false /* useGLCanvas */, false /*useAnim*/, true /* overlap */); + } + + @Test + public void test13NopGLJPanelDefOverlapMT() throws InterruptedException, InvocationTargetException { + test(new GLCapabilities(null), false /*useGears*/, width, height , frameCount, true /* initMT */, true /* useGLJPanel */, + false /* useGLCanvas */, false /*useAnim*/, true /* overlap */); + } + // @Test public void test04NopGLJPanelDefOverlapSingle() throws InterruptedException, InvocationTargetException { test(new GLCapabilities(null), false /*useGears*/, width, height , frameCount, false /* initMT */, true /* useGLJPanel */, @@ -284,6 +315,7 @@ public class TestPerf001GLJPanelInit02AWT extends UITestCase { public static void main(String[] args) { boolean useGLJPanel = true, initMT = false, useGLCanvas = false, useGears = false, manual=false; + boolean overlap = false; boolean waitMain = false; for(int i=0; i<args.length; i++) { @@ -309,6 +341,8 @@ public class TestPerf001GLJPanelInit02AWT extends UITestCase { manual = true; } else if(args[i].equals("-gears")) { useGears = true; + } else if(args[i].equals("-overlap")) { + overlap = true; } else if(args[i].equals("-wait")) { wait = true; manual = true; @@ -325,7 +359,7 @@ public class TestPerf001GLJPanelInit02AWT extends UITestCase { if( manual ) { GLProfile.initSingleton(); TestPerf001GLJPanelInit02AWT demo = new TestPerf001GLJPanelInit02AWT(); - demo.test(null, useGears, width, height, frameCount, initMT, useGLJPanel, useGLCanvas, false /*useAnim*/, false /* overlap */); + demo.test(null, useGears, width, height, frameCount, initMT, useGLJPanel, useGLCanvas, false /*useAnim*/, overlap /* overlap */); } else { org.junit.runner.JUnitCore.main(TestPerf001GLJPanelInit02AWT.class.getName()); } |