aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-10-10 15:09:35 +0200
committerSven Gothel <[email protected]>2012-10-10 15:09:35 +0200
commit1a6da1537cc7681eb1e5fe3abb26e53b3423e742 (patch)
treeef47d5d1dcb16b70ad10d8abe380719e99afe9a6 /src/test/com
parent6ac1c8c8995458671cf603e46bff89fcaefd8146 (diff)
UITestCase: Only print each display/reshape in verbose mode
Diffstat (limited to 'src/test/com')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/util/UITestCase.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/util/UITestCase.java b/src/test/com/jogamp/opengl/test/junit/util/UITestCase.java
index bd9cd0966..ccfd3867e 100644
--- a/src/test/com/jogamp/opengl/test/junit/util/UITestCase.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/UITestCase.java
@@ -214,6 +214,7 @@ public abstract class UITestCase {
private final GLReadBufferUtil screenshot;
private volatile boolean makeShot = false;
private volatile boolean makeShotAlways = false;
+ private volatile boolean verbose = false;
private volatile int displayCount=0;
private volatile int reshapeCount=0;
public SnapshotGLEventListener(GLReadBufferUtil screenshot) {
@@ -230,7 +231,9 @@ public abstract class UITestCase {
public void display(GLAutoDrawable drawable) {
final GL gl = drawable.getGL();
final boolean _makeShot = makeShot || makeShotAlways;
- System.err.println(Thread.currentThread().getName()+": ** display: "+displayCount+": "+drawable.getWidth()+"x"+drawable.getHeight()+", makeShot "+_makeShot);
+ if(verbose) {
+ System.err.println(Thread.currentThread().getName()+": ** display: "+displayCount+": "+drawable.getWidth()+"x"+drawable.getHeight()+", makeShot "+_makeShot);
+ }
if(_makeShot) {
makeShot=false;
snapshot(displayCount, null, gl, screenshot, TextureIO.PNG, null);
@@ -238,7 +241,9 @@ public abstract class UITestCase {
displayCount++;
}
public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
- System.err.println(Thread.currentThread().getName()+": ** reshape: "+reshapeCount+": "+width+"x"+height+" - "+drawable.getWidth()+"x"+drawable.getHeight());
+ if(verbose) {
+ System.err.println(Thread.currentThread().getName()+": ** reshape: "+reshapeCount+": "+width+"x"+height+" - "+drawable.getWidth()+"x"+drawable.getHeight());
+ }
reshapeCount++;
}
public void setMakeSnapshot() {
@@ -247,6 +252,9 @@ public abstract class UITestCase {
public void setMakeSnapshotAlways(boolean v) {
makeShotAlways=v;
}
+ public void setVerbose(boolean v) {
+ verbose=v;
+ }
};
}