diff options
author | Sven Gothel <[email protected]> | 2014-10-07 09:48:36 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-10-07 09:48:36 +0200 |
commit | 63b2b1cab98b4c66821da9d468ce4d86a52f7a67 (patch) | |
tree | 4c1a96dd227592eaf2b349a31f62b3a186eefbc8 /src | |
parent | da6339f8f712237dbd58180afde214e3f7692ee1 (diff) |
AnimatorBase thread-name: Add instance sequence number
Diffstat (limited to 'src')
-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 bc159ef5c..5f2db20bd 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()); |