From 7ce29d85bb85c003c9dc3b94efa84b55dfbb7f86 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 7 Jan 2012 06:17:31 +0100 Subject: Animator*: Clarify debug output --- src/jogl/classes/com/jogamp/opengl/util/Animator.java | 10 ++++++---- src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'src/jogl/classes') 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(); -- cgit v1.2.3