diff options
author | Sven Gothel <[email protected]> | 2010-09-10 05:33:17 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-09-10 05:33:17 +0200 |
commit | 63be4a40aa6ecfe9fbc6585acccbc6f6f6689377 (patch) | |
tree | 41bcd52797e1602ffa409079b7d1744a399f77b8 /make/scripts/java-run-all.sh | |
parent | 340b1ceb07907be113e33c54d084e53ddc93e368 (diff) |
NEWT: Changed Lifecycle of Display/Screen
Display/Screen:
- Removed Display reusage by unique TLS key: type + name,
instead use user-responsibility or Destroy-When-Unused (usage reference count).
- Removed X11 Display TLS pool usage
- Display creation means i, incl the later native one (X11).
- Added reference counting as follows:
- Display's refCount: number it is referenced by Screen:
display.addReference()/display.removeReference()
- Screen's refCount: number it is referenced by Window:
screen.addReference()/screen.removeReference()
- Lazy creation using refcount 0 -> 1
All resources are created when they are needed.
This also removes redundant native Display/Screen objects,
ie in case of [AWT] reparenting.
- Default lifecycle is user-responsibility, ie no Destroy-When-Unused, where
Window may be destroyed unrecoverable, which removes the Screen reference only.
- If using optional Destroy-When-Unused a
Window may be destroyed unrecoverable, which removes the Screen reference:
Screen.removeReference();
IF Screen.refCount == 0 THEN
Screen.destroy();
Display.removeReference();
IF Display.refCount == 0 THEN
Display.destroy();
- Use Destroy-When-Unused lifecycle for all automatic created Display/Screen
instances (GLWindow, NewtCanvasAWT,..)
- Display/Screen destroy/create cycles valid,
ie you can reuse destroyed Display/Screen's
- EDTUtil:
- Created right away.
- Started always via invoke, if not running.
- DefaultEDTUtil:
- Simplified locking a bit locking on:
- edtLock for start/stop
- edtTasks for tasks queue
- invoke-wait doubles check shouldStop
- invoke-wait 'waiting' outside of edtLock
+++
NEWT: Cleanup
- Window.destroy/invalidate: deep -> unrecoverable
- Window.isNativeWindowValid() -> Window.isNativeValid()
to unify with Display/Screen
- Window.isDestroyed() -> Window.isValid()
to unify and simplify logic.
Returns false if destroy(true) has been called.
- NewtFactory.wrapDisplay(.. handle) -> NewtFactory.createDisplay(.. handle),
since it actually creates a compatible display.
+++
NativeWindow X11Util: Added non TLS createDisplay()/closeDisplay()
+++
TODO:
- Stabilize (many tests fail)
- OSX
Diffstat (limited to 'make/scripts/java-run-all.sh')
-rwxr-xr-x | make/scripts/java-run-all.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/make/scripts/java-run-all.sh b/make/scripts/java-run-all.sh index 16353dff2..0d7e5b21d 100755 --- a/make/scripts/java-run-all.sh +++ b/make/scripts/java-run-all.sh @@ -46,6 +46,7 @@ uname -a | grep -i Darwin && MOSX=1 # D_ARGS="-Dnewt.debug=all" # D_ARGS="-Dnewt.debug.Window" # D_ARGS="-Dnewt.debug.Display" +# D_ARGS="-Dnewt.debug.Window -Dnewt.debug.Display" # D_ARGS="-Dnewt.debug.Window -Dnewt.debug.TestEDTMainThread" # D_ARGS="-Dnewt.debug.TestEDTMainThread" # D_ARGS="-Djogl.debug=all -Djogl.debug.DynamicLookup=true -Djogamp.debug.NativeLibrary=true" |