diff options
author | Sven Gothel <[email protected]> | 2012-01-07 06:17:31 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-01-07 06:17:31 +0100 |
commit | 7ce29d85bb85c003c9dc3b94efa84b55dfbb7f86 (patch) | |
tree | 8ea5e68b92132565c3e4d9d9f7e0575cecf93eb9 /src/jogl/classes/com | |
parent | 2c005c6bf4abd2beafdc9b8cb4b713229bc2b359 (diff) |
Animator*: Clarify debug output
Diffstat (limited to 'src/jogl/classes/com')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/util/Animator.java | 10 | ||||
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java | 4 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/Animator.java b/src/jogl/classes/com/jogamp/opengl/util/Animator.java index a9023886d..6d508f227 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/Animator.java +++ b/src/jogl/classes/com/jogamp/opengl/util/Animator.java @@ -243,7 +243,8 @@ public class Animator extends AnimatorBase { // dependencies on the Animator's internal thread. Currently we // use a couple of heuristics to determine whether we should do // the blocking wait(). - long remaining = impl.blockUntilDone(animThread) ? TO_WAIT_FOR_FINISH_LIFECYCLE_ACTION : 0; + final boolean blocking = impl.blockUntilDone(animThread); + long remaining = blocking ? TO_WAIT_FOR_FINISH_LIFECYCLE_ACTION : 0; while (remaining>0 && condition.result()) { long td = System.currentTimeMillis(); try { @@ -253,12 +254,13 @@ public class Animator extends AnimatorBase { } if(DEBUG) { if(remaining<0) { - System.err.println("finishLifecycleAction(" + condition.getClass().getName() + "): ++++++ timeout reached ++++++ "); + System.err.println("finishLifecycleAction(" + condition.getClass().getName() + "): ++++++ timeout reached ++++++ " + Thread.currentThread().getName()); } System.err.println("finishLifecycleAction(" + condition.getClass().getName() + "): finished "+ - "- waited " + (TO_WAIT_FOR_FINISH_LIFECYCLE_ACTION-remaining) + "/" + TO_WAIT_FOR_FINISH_LIFECYCLE_ACTION + + "- blocking "+blocking+ + ", waited " + (blocking ? ( TO_WAIT_FOR_FINISH_LIFECYCLE_ACTION - remaining ) : 0 ) + "/" + TO_WAIT_FOR_FINISH_LIFECYCLE_ACTION + ", started: " + isStartedImpl() +", animating: " + isAnimatingImpl() + - ", paused: " + isPausedImpl() + ", drawables " + drawables.size()); + ", paused: " + isPausedImpl() + ", drawables " + drawables.size() + " - " + Thread.currentThread().getName()); } } diff --git a/src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java b/src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java index 9bea27f45..d65967da1 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java +++ b/src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java @@ -92,7 +92,7 @@ public abstract class AnimatorBase implements GLAnimatorControl { public synchronized void add(GLAutoDrawable drawable) { if(DEBUG) { - System.err.println("Animator add: "+drawable.hashCode()+" - "+Thread.currentThread()); + System.err.println("Animator add: "+drawable.hashCode()+" - "+Thread.currentThread().getName()); } boolean paused = pause(); drawables.add(drawable); @@ -113,7 +113,7 @@ public abstract class AnimatorBase implements GLAnimatorControl { public synchronized void remove(GLAutoDrawable drawable) { if(DEBUG) { - System.err.println("Animator remove: "+drawable.hashCode()+" - "+Thread.currentThread() + ": "+toString()); + System.err.println("Animator remove: "+drawable.hashCode()+" - "+Thread.currentThread().getName() + ": "+toString()); } boolean paused = pause(); |