From 63b2b1cab98b4c66821da9d468ce4d86a52f7a67 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 7 Oct 2014 09:48:36 +0200 Subject: AnimatorBase thread-name: Add instance sequence number --- src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/jogl/classes/com') 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()); -- cgit v1.2.3