From 3e92d34de3672d7f5e401ed6181bb55a58bdf4b6 Mon Sep 17 00:00:00 2001
From: Sven Gothel Changing this state is lifecycle heavy. Bit number {@value}. Defaults to {@code false}.
Bit number {@value}.
*Defaults to {@code true}.
+ * @see #getSupportedStateMask() * @see #getStateMask() * @since 2.3.2 */ @@ -152,6 +154,7 @@ public interface Window extends NativeWindow, WindowClosingProtocol, ScalableSur *Changing this state is lifecycle heavy.
*Bit number {@value}.
*Defaults to {@code false}.
+ * @see #getSupportedStateMask() * @see #getStateMask() * @since 2.3.2 */ @@ -160,6 +163,7 @@ public interface Window extends NativeWindow, WindowClosingProtocol, ScalableSur * Set if window has the input focus, otherwise cleared. *Bit number {@value}.
*Defaults to {@code false}.
+ * @see #getSupportedStateMask() * @see #getStateMask() * @since 2.3.2 */ @@ -168,6 +172,7 @@ public interface Window extends NativeWindow, WindowClosingProtocol, ScalableSur * Set if window has window decorations, otherwise cleared. *Bit number {@value}.
*Defaults to {@code false}.
+ * @see #getSupportedStateMask() * @see #getStateMask() * @since 2.3.2 */ @@ -176,6 +181,7 @@ public interface Window extends NativeWindow, WindowClosingProtocol, ScalableSur * Set if window is always on top, otherwise cleared. *Bit number {@value}.
*Defaults to {@code false}.
+ * @see #getSupportedStateMask() * @see #getStateMask() * @since 2.3.2 */ @@ -184,6 +190,7 @@ public interface Window extends NativeWindow, WindowClosingProtocol, ScalableSur * Set if window is always on bottom, otherwise cleared. *Bit number {@value}.
*Defaults to {@code false}.
+ * @see #getSupportedStateMask() * @see #getStateMask() * @since 2.3.2 */ @@ -192,12 +199,13 @@ public interface Window extends NativeWindow, WindowClosingProtocol, ScalableSur * Set if window is sticky, i.e. visible on all virtual desktop, otherwise cleared. *Bit number {@value}.
*Defaults to {@code false}.
+ * @see #getSupportedStateMask() * @see #getStateMask() * @since 2.3.2 */ public static final int STATE_BIT_STICKY = 7; // reconfig-flag /** - * Set if window is resizable, otherwise cleared. + * Set if window is resizable after creation, otherwise cleared. *Bit number {@value}.
*Defaults to {@code true}.
* @see #getStateMask() @@ -208,6 +216,7 @@ public interface Window extends NativeWindow, WindowClosingProtocol, ScalableSur * Set if window is maximized vertically, otherwise cleared. *Bit number {@value}.
*Defaults to {@code false}.
+ * @see #getSupportedStateMask() * @see #getStateMask() * @since 2.3.2 */ @@ -216,6 +225,7 @@ public interface Window extends NativeWindow, WindowClosingProtocol, ScalableSur * Set if window is maximized horizontally, otherwise cleared. *Bit number {@value}.
*Defaults to {@code false}.
+ * @see #getSupportedStateMask() * @see #getStateMask() * @since 2.3.2 */ @@ -228,6 +238,7 @@ public interface Window extends NativeWindow, WindowClosingProtocol, ScalableSur * *Bit number {@value}.
*Defaults to {@code false}.
+ * @see #getSupportedStateMask() * @see #getStateMask() * @since 2.3.2 */ @@ -237,6 +248,7 @@ public interface Window extends NativeWindow, WindowClosingProtocol, ScalableSur * Set if the pointer is visible when inside the window, otherwise cleared. *Bit number {@value}.
*Defaults to {@code true}.
+ * @see #getSupportedStateMask() * @see #getStateMask() * @since 2.3.2 */ @@ -245,84 +257,131 @@ public interface Window extends NativeWindow, WindowClosingProtocol, ScalableSur * Set if the pointer is confined to the window, otherwise cleared. *Bit number {@value}.
*Defaults to {@code false}.
+ * @see #getSupportedStateMask() * @see #getStateMask() * @since 2.3.2 */ public static final int STATE_BIT_POINTERCONFINED = 13; + /** + * Set if window is repositionable after creation, otherwise cleared. + *Bit number {@value}.
+ *Defaults to {@code true}.
+ * @see #getSupportedStateMask() + * @see #getStateMask() + * @since 2.4.0 + */ + public static final int STATE_BIT_REPOSITIONABLE = 14; // reconfig-flag + /** * Bitmask for {@link #STATE_BIT_VISIBLE}, {@value}. + * @see #getSupportedStateMask() + * @see #getStateMask() * @since 2.3.2 */ public static final int STATE_MASK_VISIBLE = 1 << STATE_BIT_VISIBLE; /** * Bitmask for {@link #STATE_BIT_AUTOPOSITION}, {@value}. + * @see #getSupportedStateMask() + * @see #getStateMask() * @since 2.3.2 */ public static final int STATE_MASK_AUTOPOSITION = 1 << STATE_BIT_AUTOPOSITION; /** * Bitmask for {@link #STATE_BIT_CHILDWIN}, {@value}. + * @see #getSupportedStateMask() + * @see #getStateMask() * @since 2.3.2 */ public static final int STATE_MASK_CHILDWIN = 1 << STATE_BIT_CHILDWIN; /** * Bitmask for {@link #STATE_BIT_FOCUSED}, {@value}. + * @see #getSupportedStateMask() + * @see #getStateMask() * @since 2.3.2 */ public static final int STATE_MASK_FOCUSED = 1 << STATE_BIT_FOCUSED; /** * Bitmask for {@link #STATE_BIT_UNDECORATED}, {@value}. + * @see #getSupportedStateMask() + * @see #getStateMask() * @since 2.3.2 */ public static final int STATE_MASK_UNDECORATED = 1 << STATE_BIT_UNDECORATED; /** * Bitmask for {@link #STATE_BIT_ALWAYSONTOP}, {@value}. + * @see #getSupportedStateMask() + * @see #getStateMask() * @since 2.3.2 */ public static final int STATE_MASK_ALWAYSONTOP = 1 << STATE_BIT_ALWAYSONTOP; /** * Bitmask for {@link #STATE_BIT_ALWAYSONBOTTOM}, {@value}. + * @see #getSupportedStateMask() + * @see #getStateMask() * @since 2.3.2 */ public static final int STATE_MASK_ALWAYSONBOTTOM = 1 << STATE_BIT_ALWAYSONBOTTOM; /** * Bitmask for {@link #STATE_BIT_STICKY}, {@value}. + * @see #getSupportedStateMask() + * @see #getStateMask() * @since 2.3.2 */ public static final int STATE_MASK_STICKY = 1 << STATE_BIT_STICKY; /** * Bitmask for {@link #STATE_BIT_RESIZABLE}, {@value}. + * @see #getSupportedStateMask() + * @see #getStateMask() * @since 2.3.2 */ public static final int STATE_MASK_RESIZABLE = 1 << STATE_BIT_RESIZABLE; /** * Bitmask for {@link #STATE_BIT_MAXIMIZED_VERT}, {@value}. + * @see #getSupportedStateMask() + * @see #getStateMask() * @since 2.3.2 */ public static final int STATE_MASK_MAXIMIZED_VERT = 1 << STATE_BIT_MAXIMIZED_VERT; /** * Bitmask for {@link #STATE_BIT_MAXIMIZED_HORZ}, {@value}. + * @see #getSupportedStateMask() + * @see #getStateMask() * @since 2.3.2 */ public static final int STATE_MASK_MAXIMIZED_HORZ = 1 << STATE_BIT_MAXIMIZED_HORZ; /** * Bitmask for {@link #STATE_BIT_FULLSCREEN}, {@value}. + * @see #getSupportedStateMask() + * @see #getStateMask() * @since 2.3.2 */ public static final int STATE_MASK_FULLSCREEN = 1 << STATE_BIT_FULLSCREEN; /** * Bitmask for {@link #STATE_BIT_POINTERVISIBLE}, {@value}. + * @see #getSupportedStateMask() + * @see #getStateMask() * @since 2.3.2 */ public static final int STATE_MASK_POINTERVISIBLE = 1 << STATE_BIT_POINTERVISIBLE; /** * Bitmask for {@link #STATE_BIT_POINTERCONFINED}, {@value}. + * @see #getSupportedStateMask() + * @see #getStateMask() * @since 2.3.2 */ public static final int STATE_MASK_POINTERCONFINED = 1 << STATE_BIT_POINTERCONFINED; + /** + * Bitmask for {@link #STATE_BIT_REPOSITIONABLE}, {@value}. + * @see #getSupportedStateMask() + * @see #getStateMask() + * @since 2.4.0 + */ + public static final int STATE_MASK_REPOSITIONABLE = 1 << STATE_BIT_REPOSITIONABLE; /** * Number of all public state bits. + * @see #getSupportedStateMask() * @see #getStateMask() * @since 2.3.2 */ @@ -330,6 +389,7 @@ public interface Window extends NativeWindow, WindowClosingProtocol, ScalableSur /** * Bitmask covering all public state bits. + * @see #getSupportedStateMask() * @see #getStateMask() * @since 2.3.2 */ @@ -352,6 +412,7 @@ public interface Window extends NativeWindow, WindowClosingProtocol, ScalableSur * @see #STATE_MASK_FULLSCREEN * @see #STATE_MASK_POINTERVISIBLE * @see #STATE_MASK_POINTERCONFINED + * @see #STATE_MASK_REPOSITIONABLE * @since 2.3.2 */ int getStateMask(); @@ -372,10 +433,13 @@ public interface Window extends NativeWindow, WindowClosingProtocol, ScalableSur * Please note that a window's size shall also be allowed to change, i.e. {@link #setSize(int, int)}. * *- * Default value is {@link #STATE_MASK_VISIBLE} | {@link #STATE_MASK_FOCUSED} | {@link #STATE_MASK_FULLSCREEN}, + * Default minimum value is {@link #STATE_MASK_VISIBLE} | {@link #STATE_MASK_FOCUSED}, * i.e. the minimum requirement for all implementations. *
*+ * Usual desktop minimum value is {@link #STATE_MASK_VISIBLE} | {@link #STATE_MASK_FOCUSED} | {@link STATE_MASK_FULLSCREEN} | {@link STATE_MASK_RESIZABLE} | {@link STATE_MASK_REPOSITIONABLE}. + *
+ ** Before native window creation {@link #getStatePublicBitmask()} is returned, * i.e. it is assumed all features are supported. *
@@ -389,12 +453,13 @@ public interface Window extends NativeWindow, WindowClosingProtocol, ScalableSur *+ * Will be called twice. Once after simple {@link #instantiationFinished()} + * pre native window creation and once right after {@link #createNativeImpl() native creation}. + *
* @see #getSupportedStateMask() * @see #reconfigureWindowImpl(int, int, int, int, int) + * @see #instantiationFinished() + * @see #createNativeImpl() */ protected abstract int getSupportedReconfigMaskImpl(); @@ -1346,7 +1367,13 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer final RecursiveLock _lock = windowLock; _lock.lock(); try { - if ( force || ( !isFullscreen() && ( getWidth() != width || getHeight() != height ) ) ) { + if ( force || + ( ( isReconfigureMaskSupported(STATE_MASK_RESIZABLE) || !isNativeValid() ) && + !isFullscreen() && + ( getWidth() != width || getHeight() != height ) + ) + ) + { if(DEBUG_IMPLEMENTATION) { System.err.println("Window setSize: START force "+force+", "+getWidth()+"x"+getHeight()+" -> "+width+"x"+height+", windowHandle "+toHexString(windowHandle)+", state "+getStateMaskString()); } @@ -2732,6 +2759,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer final StringBuilder sb = new StringBuilder(); sb.append(getClass().getName()+"[State "+getStateMaskString()+ + ",\n Reconfig "+getSupportedStateMaskString()+ ",\n "+screen+ ",\n window["+getX()+"/"+getY()+" "+getWidth()+"x"+getHeight()+" wu, "+getSurfaceWidth()+"x"+getSurfaceHeight()+" pixel]"+ ",\n Config "+config+ @@ -2883,7 +2911,11 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer System.err.println("Window setPosition: "+getX()+"/"+getY()+" -> "+x+"/"+y+", fs "+stateMask.get(STATE_BIT_FULLSCREEN)+", windowHandle "+toHexString(windowHandle)); } // Let the window be positioned if !fullscreen and position changed or being a child window. - if ( !isFullscreen() && ( getX() != x || getY() != y || null != getParent()) ) { + if ( ( isReconfigureMaskSupported(STATE_MASK_REPOSITIONABLE) || !isNativeValid() ) && + !isFullscreen() && + ( getX() != x || getY() != y || null != getParent()) + ) + { if(isNativeValid()) { // this.x/this.y will be set by sizeChanged, triggered by windowing event system reconfigureWindowImpl(x, y, getWidth(), getHeight(), getReconfigureMask(0, isVisible())); @@ -4576,7 +4608,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer boolean _autopos = false; boolean ok; do { - if( useCustomPosition ) { + if( useCustomPosition && isReconfigureMaskSupported(STATE_MASK_REPOSITIONABLE) ) { ok = Math.abs(x - getX()) <= maxDX && Math.abs(y - getY()) <= maxDY ; } else { _autopos = stateMask.get(STATE_BIT_AUTOPOSITION); diff --git a/src/newt/classes/jogamp/newt/driver/android/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/android/WindowDriver.java index 7bf2b6146..f2c102206 100644 --- a/src/newt/classes/jogamp/newt/driver/android/WindowDriver.java +++ b/src/newt/classes/jogamp/newt/driver/android/WindowDriver.java @@ -456,7 +456,7 @@ public class WindowDriver extends jogamp.newt.WindowImpl implements Callback2 { @Override protected final int getSupportedReconfigMaskImpl() { - return minimumReconfigStateMask; + return mutableSizePosReconfigStateMask; } @Override diff --git a/src/newt/classes/jogamp/newt/driver/awt/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/awt/WindowDriver.java index b72481f1b..860ee9188 100644 --- a/src/newt/classes/jogamp/newt/driver/awt/WindowDriver.java +++ b/src/newt/classes/jogamp/newt/driver/awt/WindowDriver.java @@ -263,7 +263,7 @@ public class WindowDriver extends WindowImpl { @Override protected final int getSupportedReconfigMaskImpl() { - return minimumReconfigStateMask; + return mutableSizePosReconfigStateMask; } @Override diff --git a/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java index e12b033cc..783ee8a36 100644 --- a/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java +++ b/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java @@ -252,7 +252,7 @@ public class WindowDriver extends WindowImpl { @Override protected final int getSupportedReconfigMaskImpl() { - return minimumReconfigStateMask | + return mutableSizePosReconfigStateMask | // STATE_MASK_UNDECORATED | // STATE_MASK_ALWAYSONTOP | // STATE_MASK_ALWAYSONBOTTOM | diff --git a/src/newt/classes/jogamp/newt/driver/intel/gdl/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/intel/gdl/WindowDriver.java index f00c075b5..a8a3a2007 100644 --- a/src/newt/classes/jogamp/newt/driver/intel/gdl/WindowDriver.java +++ b/src/newt/classes/jogamp/newt/driver/intel/gdl/WindowDriver.java @@ -86,7 +86,7 @@ public class WindowDriver extends jogamp.newt.WindowImpl { @Override protected final int getSupportedReconfigMaskImpl() { - return minimumReconfigStateMask; + return mutableSizePosReconfigStateMask; } @Override diff --git a/src/newt/classes/jogamp/newt/driver/ios/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/ios/WindowDriver.java index 38cb79fa5..be53d8f34 100644 --- a/src/newt/classes/jogamp/newt/driver/ios/WindowDriver.java +++ b/src/newt/classes/jogamp/newt/driver/ios/WindowDriver.java @@ -362,13 +362,12 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl @Override protected final int getSupportedReconfigMaskImpl() { - return minimumReconfigStateMask | + return mutableSizePosReconfigStateMask | STATE_MASK_CHILDWIN | STATE_MASK_UNDECORATED | STATE_MASK_ALWAYSONTOP | STATE_MASK_ALWAYSONBOTTOM | STATE_MASK_STICKY | - STATE_MASK_RESIZABLE | STATE_MASK_MAXIMIZED_VERT | STATE_MASK_MAXIMIZED_HORZ | STATE_MASK_POINTERVISIBLE | diff --git a/src/newt/classes/jogamp/newt/driver/kd/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/kd/WindowDriver.java index 6b5943ff1..ee2925b1c 100644 --- a/src/newt/classes/jogamp/newt/driver/kd/WindowDriver.java +++ b/src/newt/classes/jogamp/newt/driver/kd/WindowDriver.java @@ -96,7 +96,7 @@ public class WindowDriver extends WindowImpl { @Override protected final int getSupportedReconfigMaskImpl() { - return minimumReconfigStateMask; + return mutableSizePosReconfigStateMask; } @Override diff --git a/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java index 2934375a3..53e05d8a0 100644 --- a/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java +++ b/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java @@ -367,13 +367,12 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl @Override protected final int getSupportedReconfigMaskImpl() { - return minimumReconfigStateMask | + return mutableSizePosReconfigStateMask | STATE_MASK_CHILDWIN | STATE_MASK_UNDECORATED | STATE_MASK_ALWAYSONTOP | STATE_MASK_ALWAYSONBOTTOM | STATE_MASK_STICKY | - STATE_MASK_RESIZABLE | STATE_MASK_MAXIMIZED_VERT | STATE_MASK_MAXIMIZED_HORZ | STATE_MASK_POINTERVISIBLE | diff --git a/src/newt/classes/jogamp/newt/driver/windows/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/windows/WindowDriver.java index 2c6b4a37e..b3a68eaf3 100644 --- a/src/newt/classes/jogamp/newt/driver/windows/WindowDriver.java +++ b/src/newt/classes/jogamp/newt/driver/windows/WindowDriver.java @@ -205,13 +205,12 @@ public class WindowDriver extends WindowImpl { @Override protected final int getSupportedReconfigMaskImpl() { - return minimumReconfigStateMask | + return mutableSizePosReconfigStateMask | STATE_MASK_CHILDWIN | STATE_MASK_UNDECORATED | STATE_MASK_ALWAYSONTOP | STATE_MASK_ALWAYSONBOTTOM | // STATE_MASK_STICKY | - STATE_MASK_RESIZABLE | STATE_MASK_MAXIMIZED_VERT | STATE_MASK_MAXIMIZED_HORZ | STATE_MASK_POINTERVISIBLE | diff --git a/src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java index 5adbba185..a71192a66 100644 --- a/src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java +++ b/src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java @@ -170,7 +170,20 @@ public class WindowDriver extends WindowImpl { @Override protected final int getSupportedReconfigMaskImpl() { - return ( minimumReconfigStateMask | GetSupportedReconfigMask0(javaWindowHandle) ) & STATE_MASK_ALL_RECONFIG; + if( 0 == javaWindowHandle ) { + return mutableSizePosReconfigStateMask | + STATE_MASK_CHILDWIN | + STATE_MASK_UNDECORATED | + STATE_MASK_ALWAYSONTOP | // optional + STATE_MASK_ALWAYSONBOTTOM | // optional + STATE_MASK_STICKY | // optional + STATE_MASK_MAXIMIZED_VERT | // optional + STATE_MASK_MAXIMIZED_HORZ | // optional + STATE_MASK_POINTERVISIBLE | + STATE_MASK_POINTERCONFINED; + } else { + return ( mutableSizePosReconfigStateMask | GetSupportedReconfigMask0(javaWindowHandle) ) & STATE_MASK_ALL_RECONFIG; + } } @Override diff --git a/src/newt/native/Window.h b/src/newt/native/Window.h index f6aba4c83..b3924e5b1 100644 --- a/src/newt/native/Window.h +++ b/src/newt/native/Window.h @@ -55,7 +55,8 @@ #define FLAG_IS_FULLSCREEN ( 1 << 11 ) #define FLAG_IS_POINTERVISIBLE ( 1 << 12 ) #define FLAG_IS_POINTERCONFINED ( 1 << 13 ) -#define FLAG_IS_FULLSCREEN_SPAN ( 1 << 14 ) +#define FLAG_IS_REPOSITIONABLE ( 1 << 14 ) +#define FLAG_IS_FULLSCREEN_SPAN ( 1 << 15 ) #define TST_FLAG_CHANGE_VISIBILITY(f) ( 0 != ( (f) & FLAG_CHANGE_VISIBILITY ) ) #define TST_FLAG_CHANGE_VISIBILITY_FAST(f) ( 0 != ( (f) & FLAG_CHANGE_VISIBILITY_FAST ) ) @@ -85,6 +86,7 @@ #define TST_FLAG_IS_MAXIMIZED_HORZ(f) ( 0 != ( (f) & FLAG_IS_MAXIMIZED_HORZ ) ) #define TST_FLAG_IS_MAXIMIZED_ANY(f) ( 0 != ( (f) & ( FLAG_IS_MAXIMIZED_VERT | FLAG_IS_MAXIMIZED_HORZ ) ) ) #define TST_FLAG_IS_FULLSCREEN(f) ( 0 != ( (f) & FLAG_IS_FULLSCREEN ) ) +#define TST_FLAG_IS_REPOSITIONABLE(f) ( 0 != ( (f) & FLAG_IS_REPOSITIONABLE ) ) #define TST_FLAG_IS_FULLSCREEN_SPAN(f) ( 0 != ( (f) & FLAG_IS_FULLSCREEN_SPAN ) ) #endif diff --git a/src/newt/native/X11Window.c b/src/newt/native/X11Window.c index e4c70d6ca..9f635fce7 100644 --- a/src/newt/native/X11Window.c +++ b/src/newt/native/X11Window.c @@ -1088,6 +1088,7 @@ JNIEXPORT jint JNICALL Java_jogamp_newt_driver_x11_WindowDriver_GetSupportedReco FLAG_IS_FULLSCREEN | FLAG_IS_POINTERVISIBLE | FLAG_IS_POINTERCONFINED | + FLAG_IS_REPOSITIONABLE | FLAG_IS_FULLSCREEN_SPAN; } diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLContextSurfaceLockNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLContextSurfaceLockNEWT.java index 8d26ebb82..af329dfa7 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLContextSurfaceLockNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLContextSurfaceLockNEWT.java @@ -48,7 +48,7 @@ import com.jogamp.opengl.test.junit.util.UITestCase; @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class TestGLContextSurfaceLockNEWT extends UITestCase { - static final int demoSize = 64; + static final int demoSizePos = 80; public abstract class MyRunnable implements Runnable { final Object postSync; @@ -77,6 +77,8 @@ public class TestGLContextSurfaceLockNEWT extends UITestCase { System.err.println("Animatr "+id+", count "+frameCount+": PRE: "+Thread.currentThread().getName()); for(int c=0; c