diff options
author | Sven Gothel <[email protected]> | 2014-10-07 09:48:36 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-10-08 22:12:53 +0200 |
commit | 4b2552af6ba4b92a039cc1514194d8066e8e1f44 (patch) | |
tree | 057eeba5d10d6ae207717a84fa2d706bbbf1fbba | |
parent | e192f05739d37e4226bc64fcca473af5463ce179 (diff) |
AnimatorBase thread-name: Add instance sequence number
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java b/src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java index 3d5935457..2c058fc5c 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java +++ b/src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java @@ -89,6 +89,8 @@ public abstract class AnimatorBase implements GLAnimatorControl { boolean blockUntilDone(final Thread thread); } + private static int seqInstanceNumber = 0; + protected int modeBits; protected AnimatorImpl impl; protected String baseName; @@ -146,15 +148,16 @@ public abstract class AnimatorBase implements GLAnimatorControl { */ protected final synchronized void initImpl(final boolean force) { if( force || null == impl ) { + final String seqSuffix = String.format("#%02d", seqInstanceNumber++); if( useAWTAnimatorImpl( modeBits ) ) { try { impl = (AnimatorImpl) awtAnimatorImplClazz.newInstance(); - baseName = getBaseName("AWT"); + baseName = getBaseName("AWT")+seqSuffix; } catch (final Exception e) { e.printStackTrace(); } } if( null == impl ) { impl = new DefaultAnimatorImpl(); - baseName = getBaseName(""); + baseName = getBaseName("")+seqSuffix; } if(DEBUG) { System.err.println("Animator.initImpl: baseName "+baseName+", implClazz "+impl.getClass().getName()+" - "+toString()+" - "+getThreadName()); |